import Control.Applicative

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

integral :: [Int] -> Int
integral [x] = x 
integral (x:xs) = x + integral xs

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