-- 提出された回答を参考にした import Data.List hantei ds dmax pmax = if pmax == 0 then 0 else if pmax `elem` ds then 1 else maximum [c, 2] where c = ceiling $ fromIntegral (pmax::Int) / fromIntegral (dmax::Int) main = do nstr <- getLine dstr <- getLine pstr <- getLine let n = read nstr :: Int ds = sort $ map read $ words dstr :: [Int] dmax = last ds pmax = maximum $ map (abs . read) $ words pstr :: Int print $ hantei ds dmax pmax