N = int(input()) a = [4, 3] while len(a) <= N: a.append((19 * a[-1] - 12 * a[-2]) / 4) if N >= 2: print(a[-1]) else: print(a[N])