n = int(input()) print(3 * n ** 2)