from math import pi, floor X = int(input()) ans = .0 if X == 2: ans += (pi ** 2 / 6 - 1) * 10 ** 6 X += 1 MAX = 10 ** 12 for i in range(X, 30): j = 2 while (y := (j ** i)) < MAX: ans += 10 ** 6 / y j += 1 print(floor(ans))