func n m = n `div` m `div` 1000 * 1000 main = getContents >>= (\(n:m:_) -> print $ func n m) . map read . lines