n = int(input()) D = sorted(map(int, input().split())) x, y = sorted(map(lambda x: abs(int(x)), input().split())) if y < D[0]: print(2) else: print((y + D[-1] - 1) // D[-1])