import sys input = sys.stdin.readline def main(): n = int(input()) m = 2**6 num = [2**i for i in range(6)] dp = [[0 for i in range(m)] for j in range(n+1)] dp[0][0] = 1 for i in range(1, n+1): for j in range(m): for k in range(6): dp[i][j | num[k]] += dp[i-1][j] / 6 print(dp[-1][-1]) if __name__ == '__main__': main()