import sys read = sys.stdin.buffer.read readline = sys.stdin.buffer.readline readlines = sys.stdin.buffer.readlines # B[k] = 4^kA_k とすると、全部整数で計算できる N = int(read()) B = [4,12] + [0] * 100 for k in range(2,101): B[k] = 19 * B[k-1] - 48 * B[k-2] A = [x / (4 ** i) for i,x in enumerate(B)] A[0], A[4] answer = A[N] print('{:.20f}'.format(answer))