from decimal import Decimal n=int(input()) print(int((Decimal(str(n))**Decimal("2")))*3)