def main(): N = int(input()) if N == 1: return 1.0 if N == 2: return 2.0 res = 2.0 for n in range(3, N + 1): res += 2 / n for a in range(1, n): for b in range(a + 1, n): res += 2 * a * b / (n * (n - 1)) return res print(main())