#include "bits/stdc++.h" #define int long long #define rep(i, n) for (int i = 0; i < (int)(n); i++) // [0, b) #define rep2(i, a, b) for (int i = (int)(a); i < (int)(b); i++) // [a, b) #define rep3(i, a, b) // reversed [a, b] so [b, b-1, ... a] #define FOR(i, a) for (auto &i: a) #define ALL(obj) begin(obj), end(obj) #define MAX(x) *max_element(ALL(x)) #define MIN(x) *min_element(ALL(x)) #define SUM(x) accumulate(ALL(x), 0LL) #define LOWER_BOUND(A, key) distance(A.begin(), lower_bound(ALL(A), key)) #define UPPER_BOUND(A, key) distance(A.begin(), upper_bound(ALL(A), key)) using namespace std; const int MOD = (int)(1e9 + 7); const int INF = (int)(1e13 + 7); const double EPS = 1e-14; const double PI = acos(-1); int CEIL(int a, int b) { return (a >= 0 ? (a + (b - 1)) / b : (a - (b - 1)) / b); } //ceil() for int int mod(int a, int b) { return a >= 0 ? a % b : a - (b * CEIL(a, b)); } //always return positive num int pow_mod(int a, int b) { //return x^y in order(log(y)) int res = 1; for (a %= MOD; b; a = a * a % MOD, b >>= 1) if (b & 1) res = res * a % MOD; return res; } signed main() { cin.tie(0); ios::sync_with_stdio(false); int x; cin >> x; if (x == 2) { cout << 1000000 << endl; return 0; } double ans = -10000; rep2(i, x, x + 10000) { double zeta = 0; rep2(j, 1, 1000) { zeta += 1 / pow(j, i); } ans += zeta; } cout << (int)floor(ans * pow(10, 6)) << endl; }