main = interact $ unlines.map (show.quasiIntegral func.read).lines

func x = x^2

quasiIntegral :: (Int -> Int) -> Int -> Int
quasiIntegral f d = sum $ map ((*d).f) $ lPoint d
lPoint d = [0,d..600 - d]