using System; using static System.Console; using System.Linq; using System.Collections.Generic; class Program { static int NN => int.Parse(ReadLine()); static void Main() { Solve(); } static void Solve() { var n = NN; var dp = Enumerable.Repeat(-1.0, n + 1).ToArray(); dp[0] = 0; WriteLine(Break(n, dp)); } static double Break(int n, double[] dp) { if (dp[n] >= 0) return dp[n]; var sum = 0.0; for (var i = 0; i < n; ++i) { sum += Break(i, dp) + Break(n - i - 1, dp) + 1; } dp[n] = sum / n; return dp[n]; } }