from math import log
a, n, d = 1, 0, 1 # a = 1, n = 0 et d = 1
while d > 10**(-6):
     d = a
     a = log(1 + 1/a)
     a = log(1 + 1/a)
     n = n + 1
     d = d - a
print(a)
