#include #include #define rep(i,n) for(int i=0; i<(int)(n); i++) using namespace std; using LL = long long; const LL INF = 1e12; const int Max_x = 1e4; const int Max_a = 1e6; double zeta(LL a, LL x){ LL res = a - 1; rep(i,x - 1){ res *= a; if(res > INF) break; } double d = res; return 1 / d; } int main(){ LL x; cin >> x; assert(2 <= x and x <= Max_x); double res = 0.0; if(x == 2){ cout << 1000000 << endl; } else{ for(LL a = 2; a <= Max_a; a++) res += zeta(a, x); res *= 1000000; int ans = res; cout << ans << endl; } return 0; }