from collections import * from itertools import * from functools import * from heapq import * import sys,math input = sys.stdin.readline N = int(input()) B = [0]*(101) B[0] = 4 B[1] = 12 for i in range(2,N+1): B[i] = 19*B[i-1] - 48*B[i-2] ans = B[N]/pow(4,N) print(ans)