ans = [16, 43, 120, 382, 1236, 4243, 14828, 52996] t = int(input()) n, c = map(int,input().split()) print(ans[n - 3])