main = print . ceiling . foldl (flip (/)) 1 . map read . words =<< getLine