from math import floor def z(n): r = 0 for i in range(1,1000): r += 1/pow(i, n) return r x = int(input()) if x >= 21: print(0) exit() ans = 0 for i in range(x, x+200): ans += z(i)-1 print(floor(ans*1000000))