n=int(input()) dp=[[0]*7 for i in range(n+1)] dp[0][0] = 1 for i in range(n): for j in range(7): dp[i+1][j] += dp[i][j] * (j / 6) if j < 6: dp[i+1][j+1] += dp[i][j] * ((6-j)/6) print(dp[n][6])