s = 1
while True:
    N = int(input())
    if N == -1:
        exit()
    if s != 1:
        print()
    B = 2
    x = 1
    for i in range(N):
        B += x
        x = 2 * x
    print(f'Caso {s}')
    print(f'{B ** 2}')
    s += 1
