r = int(eval(input()))

print((int(3*r**2)))

r = int(eval(input()))

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

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

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