#include #include using ldouble = long double; constexpr ldouble INF = 1e12; void solve() { int x; std::cin >> x; 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; }