#include using namespace std; using LL = long long; using ULL = unsigned long long; #define rep(i,n) for(int i=0; i<(n); i++) LL GCD(LL a, LL b) { return b ? GCD(b, a % b) : a; } double F(LL j, LL x) { double jb = j, xb = x; return jb / (pow(jb, xb) * (jb - 1.)); } int main() { LL x; cin >> x; double ans = 0.; if (x == 2) { ans = 1.; } else { for (LL j = 2; log(j) * x < 30.; j++) { ans += F(j, x); } } LL ansi = ans * 1000000; cout << ansi << endl; return 0; }