from functools import lru_cache @lru_cache(maxsize = None) def comb(n, k): if k == 0 or k == n: return 1 else: return comb(n-1, k-1) + comb(n-1, k) @lru_cache(maxsize = None) def B(n): if n == 0: return 1 else: return -sum(comb(n+1, k) * B(k) for k in range(0, n)) / (n+1) def solve(x, N = 100, K = 100): S = sum((x+n)**(-2) for n in range(1, N+1)) S += 1/(x+N) - 0.5/(x+N)**2 S += sum(B(2*k)*(x+N)**(-2*k-1) for k in range(1,K+1)) return S x = float(input()) print(solve(x))