N = int(input()) a = [0] * 101 a[0], a[1] = 4, 3 for i in range(2, N + 1): a[i] = 19 * a[i - 1] - 12 * a[i - 2] a[i] /= 4 print(a[N])