# your code goes here
def pierwiastek(x,eps):
a = 0
b = x
while abs(b - a) > eps:
c = (a + b) / 2
if c * c > x:
b = c
else:
a = c
return c
print(pierwiastek(2, 0.001))
IyB5b3VyIGNvZGUgZ29lcyBoZXJlCmRlZiBwaWVyd2lhc3Rlayh4LGVwcyk6CglhID0gMAoJYiA9IHgKCXdoaWxlIGFicyhiIC0gYSkgPiBlcHM6CgkJYyA9IChhICsgYikgLyAyCgkJaWYgYyAqIGMgPiB4OgoJCQliID0gYwoJCWVsc2U6CgkJCWEgPSBjCglyZXR1cm4gYwoJCnByaW50KHBpZXJ3aWFzdGVrKDIsIDAuMDAxKSk=