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