#include #include int main() { int i, j, x; long double ans = 0.0, tmp; scanf("%d", &x); if (x == 2) printf("1000000\n"); else if (x >= 5) { for (i = 50; i >= x; i--) { for (j = 100, tmp = 0.0; j >= 1; j--) tmp += powl(j, -i); ans += tmp - 1.0; } printf("%d\n", (int)(ans * 1000000)); } else { for (i = 50; i >= 5; i--) { for (j = 100, tmp = 0.0; j >= 1; j--) tmp += powl(j, -i); ans += tmp - 1.0; } for (j = 100, tmp = 0.0; j >= 1; j--) tmp += powl(j, -4); ans += tmp - 1.0; if (x <= 3) { for (j = 1000, tmp = 0.0; j >= 1; j--) tmp += powl(j, -3); ans += tmp - 1.0; } printf("%d\n", (int)(ans * 1000000)); } fflush(stdout); return 0; }