n = gets.to_i cheby = gets.strip.split(' ').map(&:to_i) #p @cheby goal = gets.strip.split(' ').map(&:to_i).map(&:abs) #p @goal if goal == [0, 0] p "0" exit end goal_max = goal.max cheby_max = cheby.max if goal_max < cheby_max p (goal.max.to_f / cheby.max).ceil + 1 else p (goal.max.to_f / cheby.max).ceil end