N = int(input()) D = list(map(int, input().split())) a, b = map(int, input().split()) x = max(abs(a), abs(b)) if x in D: print(1) else: d = max(D) print(max(2, (x + d - 1)//d))