N=int(input()) DP=[0]*7 DP[0]=1 P=[r/6 for r in range(7)] for _ in range(N): for k in range(6,0,-1): DP[k]=DP[k]*P[k]+DP[k-1]*(1-P[k-1]) if DP[0]: DP[0]=0 print(DP[6])