print((3*int(eval(input()))**2))
a = int(eval(input()))

print((3*a**2))
print((3 * int(eval(input())) ** 2))

a = int(eval(input()))
print((3 * a**2))

-print((3 * int(eval(input())) ** 2)) +a = int(eval(input())) +print((3 * a**2))