def newton(a,iter):
if iter<maxiter and abs(f(a))>toler:
#print(a)
a=a-f(a)/fder(a)
iter=iter+1
return newton(a,iter)
else:
return a
# your code goes here
ZGVmIG5ld3RvbihhLGl0ZXIpOgogICAgaWYgaXRlcjxtYXhpdGVyIGFuZCBhYnMoZihhKSk+dG9sZXI6CgkgICAgI3ByaW50KGEpCgkgICAgYT1hLWYoYSkvZmRlcihhKQoJICAgIGl0ZXI9aXRlcisxCgkgICAgcmV0dXJuIG5ld3RvbihhLGl0ZXIpCiAgICBlbHNlOgogICAgICAgIHJldHVybiBhCgojIHlvdXIgY29kZSBnb2VzIGhlcmU=