#include using namespace std; #define REP(i,n) for(int i=0; i<(int)(n); i++) int main() { ios_base::sync_with_stdio(0); cin.tie(0); int n; cin >> n; double ret = 0; for (int i = 1; i <= n; i++) { double sum = 0.0; if (i < 3) sum = 1.0; else { sum += 2.0 / i; double tmp = 0.0; int tot = 0; for (int x = 1; x < i; x++) { for (int y = 1; y < x; y++) { ++tot; tmp += x * y; } } sum += (i - 2.0) / i * tmp / tot; } ret += sum; } cout << fixed << setprecision(12) << ret << endl; return 0; }