import Control.Applicative
import Data.List

makeList :: Int -> [Int]
makeList d = [x*x*d*d*d | x <- [1..600], x*d < 600]

integral :: (Num a) => [a] -> a
integral xs = foldl (\acc x -> acc + x) 0 xs

main = do
  n <- fmap (read :: String -> Int) . words <$> getContents
  mapM_ print (fmap integral (fmap makeList n))