def fib(a):
	b,c = 3,5
	if a == 1:
		return b
	elif a == 2:
		return c
	else:
		for i in range(a - 2):
			b,c = c,(((c - b) * 2) + c)
		return c		

iteration = int(input())


print(fib(iteration) ** 2)


c2ed3fd8573356f7158d6a305cc7db88731550d2
<mask token>

def fib(a):
    b, c = 3, 5
    if a == 1:
        return b
    elif a == 2:
        return c
    else:
        for i in range(a - 2):
            b, c = c, (c - b) * 2 + c
        return c


<mask token>

def fib(a):
    b, c = 3, 5
    if a == 1:
        return b
    elif a == 2:
        return c
    else:
        for i in range(a - 2):
            b, c = c, (c - b) * 2 + c
        return c


<mask token>
print(fib(iteration) ** 2)

def fib(a):
    b, c = 3, 5
    if a == 1:
        return b
    elif a == 2:
        return c
    else:
        for i in range(a - 2):
            b, c = c, (c - b) * 2 + c
        return c


iteration = int(input())
print(fib(iteration) ** 2)

def fib(a):
	b,c = 3,5
	if a == 1:
		return b
	elif a == 2:
		return c
	else:
		for i in range(a - 2):
			b,c = c,(((c - b) * 2) + c)
		return c		

iteration = int(input())


print(fib(iteration) ** 2)

