import Control.Monad
import Control.Applicative
import Data.List

toInt :: String -> Int
toInt x = read x :: Int
 
getInts = do
  x <- getLine
  let y = (map$toInt)$words x
  return y

area :: Int -> Int
area a = 3 * a * a

main :: IO()
main = do
  x <- getInts
  let r = head x :: Int
  print $ area r