from math import fabs n = input() f = lambda x: fabs(int(x)) d_list = list(map(int, input().split())) gx, gy = map(f, input().split()) if gx == gy == 0: print(0); exit() if gx == gy and gx in d_list: print(1); exit() dis = gx + gy max_d = max(d_list) now_x, now_y, count = 0, 0, 0 while max(gx-now_x, gy-now_y) > max_d: if now_x + max_d <= gx: now_x += max_d if now_y + max_d <= gy: now_y += max_d count += 1 if count >= 2: print(count + 1) else: print(count + 2)