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); if (dst < d[0]) System.out.println("2"); else if (dst <= d[n - 1]) { boolean flag = false; for (int dist : d) { if (dst == dist) { System.out.println("1"); flag = true; break; } } if (!flag) System.out.println("2"); } else { if (dst % d[n - 1] == 0) System.out.println(dst / d[n - 1]); else System.out.println(dst / d[n - 1] + 1); } } }