#include<bits/stdc++.h>
//#include<atcoder/all>

using namespace std;
//using namespace atcoder;
using ll = long long;
using ull = unsigned long long;
using P = pair<int,int>;
#define rep(i,n) for(ll i = 0;i < (ll)n;i++)
#define ALL(x) (x).begin(),(x).end()
#define MOD 1000000007



int main(){
  
  int x;
  cin >> x;
  double res = 0;
  if(x == 2)res += acos(-1)*acos(-1)/6;
  for(int n = x;n <= 100;n++){
    double g = 0;
    for(int i = 1;;i++){
      __int128_t po = 1;
      rep(j,n)po = po*i;
      if(po > (ll)1e18)break;
      g += 1.0/po;
    }
    res += g-1;
  }
  res *= 1000000;
  cout << floor(res) << "\n";


  return 0;
}