import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class Main { public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String str = br.readLine(); int n = Integer.parseInt(str); str = br.readLine(); String[] dstr = str.split(" "); int[] d = new int[n]; for (int i = 0; i < n; i++) d[i] = Integer.parseInt(dstr[i]); str = br.readLine(); String[] coordinate = str.split(" "); int x = Integer.parseInt(coordinate[0]); int y = Integer.parseInt(coordinate[1]); int dst = Math.max(x, y); int[] d_s = Sort(d); if (dst < d_s[n - 1]) System.out.println("2"); else if (dst <= d_s[0]) { boolean flag = false; for (int dist : d_s) { if (dst == dist) { System.out.println("1"); flag = true; break; } } if (!flag) System.out.println("2"); } else { if (dst % d_s[0] == 0) System.out.println(dst / d_s[0]); else System.out.println(dst / d_s[0] + 1); } } private static int[] Sort(int[] num) { int length = num.length; for (int i = 1; i < length - 1; i++) { for (int j = 0; j < length - i; j++) { if (num[j] < num[j + 1]) { int tmpnum = num[j]; num[j] = num[j + 1]; num[j + 1] = tmpnum; } } } return num; } }