countZ :: Integral a => a -> a countZ n = 2 * (n `div` 3 + n `div` 5) main :: IO () main = print . countZ =<< readLn