#include using namespace std; int main() { int n; cin >> n; if (n == 1) { cout << 1 << endl; return 0; } if (n == 2) { cout << 2 << endl; return 0; } long double ans = 2; for (int i = 2; i < n; i++) { long double total = 2.0 / (i + 1); for (int p = 1; p <= i - 1; p++) { for (int j = 1; j <= i; j++) { for (int k = 1; k <= i; k++) { if (j == k) continue; total += j * k * (1.0 / (i + 1)) * (1.0 / i) * (1.0 / (i - 1)); } } } ans += total; } printf("%.20f\n", (double)ans); }