#include int ri() { int n; scanf("%d", &n); return n; } int main() { int n = ri(); if (n == 1) { puts("1.20205690315959428539973816151144"); } else if (n == 2) { puts("1.0823232337111381915160036965411679027747"); } else if (n == 3) { puts("1.036927755"); } else if (n > 50) puts("1"); else { long double res = 0; for (int b = 2; b <= 100; b++) { long double x = 1; for (int i = 0; i < n; i++) x *= (long double) 1 / b; res += (1 - x) / ((long double) b * (b - 1)); } res += 0.01; for (int a = 2; a <= 400; a++) { long double cur = 0; for (int b = a + 1; b <= 1000; b++) { long double x = 1; for (int i = 0; i < n; i++) x *= (long double) a / b; cur += (1 - x) / ((long double) b * (b - a)); } for (int i = 1; i <= a; i++) cur -= 1.0L / (1000 + i) / a; for (int i = 1; i <= n; i++) cur /= a; res += cur; } printf("%.11Lf\n", res); } return 0; }