solve a
 | (a `mod` 3 == 0) = (a `div` 3) * (a `div` 3) * (a `div` 3)
 | (a `mod` 3 == 1) = (a `div` 3 + 1) * (a `div` 3) * (a `div` 3)
 | (a `mod` 3 == 2) = (a `div` 3 + 1) * (a `div` 3 + 1) * (a `div` 3)

main = do
 l <- read <$> getLine :: IO Int
 print $ solve l