# birthexp 
# Fig. 41.3. 
# Computes E(N) and math.sqrt(math.pi*N/2) - 1/3 
# input: 365

import math

N = int(input("days=? "))
prob = 1
tot = 0
for i in range(1, N+1): 
  prob *= (1-((i-1)/N))
  tot += prob
print(f"Mean: {tot:.6f}, Q: {math.sqrt(math.pi*N/2)-1/3:.6f}")
