#include #include using namespace std; using namespace atcoder; using ll = long long; int N; map mp; double f(int n) { if (mp.count(n)) return mp[n]; if (n == 0) return 0; double sum = 0; for (int i = 0; i < n; i++) sum += f(i) + f(n - i - 1); return mp[n] = sum / n + 1; } int main() { cin >> N; cout << fixed << setprecision(15) << f(N) << endl; return 0; }