{-# OPTIONS_GHC -Wall -Werror #-}

import System.IO

solve :: Int -> Int -> Int -> Int
solve _ 0 s = s
solve d n s = solve d next (s + ds)
  where next = n - d
        ds = d * next * next

main :: IO ()
main = do
  end <- isEOF
  if end
     then return ()
     else do
       d <- (readLn :: IO Int)
       print $ solve d 600 0
       main