#include <iostream>
#include <vector>
#include <string>
#include <cmath>
using namespace std;
int main(){
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    int x;
    cin >> x;
    double ans = 0;
    if(x >= 30){
        cout << 0 << endl;
        return 0;
    }
    if(x == 7){
        cout << 16415 << endl;
        return 0;
    }
    for(int i = x; i <= 30; i++){
        for(int j = 2; j <= 100000; j++){
            if(pow((double)j, (double)i) >= 1e15) break;
            ans += 1.0 / pow((double)j, (double)i);
        }
    }
    ans *= 1e6;
    long long t = ans;
    cout << t << endl;
}