f :: Int -> Int
f x = x * x

calcIntegral :: Int -> Int
calcIntegral d = sum $ map (* d) $ map f [d, 2 * d .. 600 - d]

main :: IO ()
main = putStr . unlines . map show . map calcIntegral . map read . lines =<< getContents