import sys

# input = sys.stdin.readline

inf = 10 ** 18

P = 10 ** 9 + 7



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



print((3 * r * r))
import sys

# input = sys.stdin.readline
inf = 10**18
P = 10**9 + 7
print((3 * (int(eval(input())) ** 2)))

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

-import sys - -# input = sys.stdin.readline -inf = 10**18 -P = 10**9 + 7 -print((3 * (int(eval(input())) ** 2))) +r = int(eval(input())) +print((3 * r * r))