#include #include #include #include //#include #include #include #include #include #include //#include #include #include #include //#include #include #include //#include #include #include #include #include const int dx[] = {1, 0, -1, 0}; const int dy[] = {0, 1, 0, -1}; using namespace std; typedef long long ll; typedef vector vi; typedef vector vll; typedef pair pii; int main() { int N; cin >> N; double ans = 0; for (int i = 1; i <= N; i++) { if (i <= 2) ans += 1; else { double plus = 2./i; int sum = 0; for (int j = 1; j <= i-1; j++) for (int k = j+1; k <= i-1; k++) { sum += j*k; } plus += 2.*sum/i/(i-1); ans += plus; } } printf("%.10lf\n", ans); return 0; }