local x = io.read("*n") local lim = 1000000 local ans = 0 for n = 1, lim - 1 do local v = 1 / (x + n) / (x + n) ans = ans + v end local remmin = 1 / (lim + x) local remmax = 1 / (lim - 1 + x) ans = ans + (remmin + remmax) / 2 print(string.format("%.10f", ans))