n = int(input()) def f(x): return (x * x * x + n * n * n) ** 0.5 N = 10 ** 5 a = 0 b = 1 h = (b-a)/N S = (h/3) * sum((f(h*i) + 4*f(h*(i+1)) + f(h*(i+2))) for i in range(0,N-1, 2)) print(S)