import math N = int(input()) D = list(map(int,input().split())) Gx,Gy = map(int,input().split()) if Gx == Gy == 0: answer = 0 elif max(abs(Gx), abs(Gy)) in D: answer = 1 elif max(abs(Gx),abs(Gy)) < max(D): answer = 2 elif max(abs(Gx), abs(Gy)) > max(D): a = max(abs(Gx), abs(Gy)) b = max(D) answer = math.ceil(a / b) print(answer)