﻿from math import *

def F(x):
    if x>=0:
        y=1+sqrt(x)
    else:
        y=(1-x)**2
    return y


