# iter_1 = int(input())
# answer = int()
# # 0 2*2  ==
# # 1 3*3  ==
# # 2 5*5
# # 3 8*8
# # 4
# # 5 33*
# #              (2^n + 1)^2
# # for i in range(iter_1 + 1):
# answer = (2 ** iter_1 + 1) ** 2
#
# print(answer)


print((2 ** int(input()) + 1) ** 2)
