r = int(eval(input()))

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

ans = 3 * r ** 2

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

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

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