package yukicoder; import java.util.*; public class Q467 { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); long[] d = new long[n]; for (int i = 0; i < n; ++i) { d[i] = sc.nextLong(); } long x = sc.nextLong(); long y = sc.nextLong(); x = Math.abs(x); y = Math.abs(y); Arrays.sort(d); long ans = 0; if (Math.max(x, y) > 2 * d[n - 1]) { long c = Math.max(x / d[n - 1], y / d[n - 1]); x = Math.max(0, x - d[n - 1] * (c - 1)); y = Math.max(0, y - d[n - 1] * (c - 1)); ans += c - 1; } ans += 2; for (int i = 0; i < n; ++i) { if (Math.max(x, y) == d[i]) { --ans; break; } } System.out.println(ans); } }