#include<bits/stdc++.h>
#define _GLIBCXX_DEBUG
using namespace std;
#define rep(i,n) for(int i=0;i<(n);i++)
#define all(v) v.begin(),v.end()
#define PI acos(-1)
typedef  long long ll;
ll MOD=1000000007;

ll gcd(ll x,ll y){
   if(y==0) return x;
   else return gcd(y,x%y);
}
ll lcm(ll x,ll y){
   return x/gcd(x,y)*y;
}

int main(){
   int x;
   cin>>x;
   long double ans=0.0;
   for(int i=x;i<=MOD-7;i++){
      long double tmp=0.0;
      for(int j=1;j<=MOD-7;j++){
         long double t=1.0/pow(j,i);
         tmp+=t;
         if(t<0.000000001){
            break;
         }
      }
      tmp--;
      ans+=tmp;
      if(tmp<0.0000000001){
         break;
      }
   }
   ans*=1000000;
   ans=floor(ans);
   cout<<ans<<endl;


   return 0;
}