import sys def input(): return sys.stdin.readline().rstrip() def main(): A = [4, 3] N = int(input()) for i in range(N-1): A.append((19*A[-1]-12*A[-2])/4) print(f'{A[N]:.12f}') if __name__ == '__main__': main()