r = int(eval(input()))

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

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

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

-print((3 * r**2)) +print((3 * (r**2)))