#include using namespace std; #define FOR(i,n) for(int i = 0 ;i < (n); i++) #define sz(c) ((int)c.size()) #define ten(n) ((int)1e##n) typedef long long ll; typedef pair Pll; typedef pair Pii; int main() { int n; cin >> n; double ans = 1.0; for (int c = 2; c <= n; c++) { double p = 2 / double(c * (c - 1)); double sum = 0; for (int x = 1; x < c; x++) { for (int y = 1; y < x; y++) { sum += x * y; } } ans += sum * p + 2.0 / c; } printf("%.15lf\n",ans); return 0; }