from math import sqrt N = int(input()) def func(x): return sqrt(x*x*x+N*N*N) S = 0 n = 1 << 20 for i in range(n+1): S += (1 if i == 0 or i == n else 4 if i % 2 else 2) * func(i/n) print(S / (3*n))