#include #include #include #include using ldouble = long double; constexpr ldouble INF = 1e20; void solve() { int x; std::cin >> x; if (x == 2) { std::cout << 1000000 << "\n"; return; } ldouble ans = 0; for (ldouble i = 2;; ++i) { if (std::pow(i, x) > INF) break; for (int p = x; std::pow(i, p) <= INF; ++p) { ans += std::pow(i, -p); } } std::cout << std::floor(ans * 1e6) << "\n"; } int main() { std::cin.tie(nullptr); std::ios::sync_with_stdio(false); solve(); return 0; }