//Задача "Лотерея"
//1-ая личная интернет-олимпиада сезона 2009-2010
//Автор решения: Носенко Максим, nosenkomax@gmail.com


import java.util.*;
import java.io.*;

public class lottery_mn implements Runnable {

	public static void main(String args[]) {
		new Thread(new lottery_mn()).start();
	}

	BufferedReader br;
	StringTokenizer st;
	PrintWriter out;
	private String FNAME = "lottery";
	boolean eof = false;

	@Override
	public void run() {
		try {
			Locale.setDefault(Locale.US);
			br = new BufferedReader(new FileReader(FNAME + ".in"));
			out = new PrintWriter(FNAME + ".out");
			solve();
			br.close();
			out.close();

		} catch (Exception e) {
			e.printStackTrace();
			System.exit(566);
		}
	}

	String nextToken() {
		while (st == null || !st.hasMoreTokens()) {
			try {
				st = new StringTokenizer(br.readLine());
			} catch (IOException e) {
				eof = true;
				return "0";
			}
		}
		return st.nextToken();
	}

	int nextInt() {
		return Integer.parseInt(nextToken());
	}

	long nextLong() {
		return Long.parseLong(nextToken());
	}

	double nextDouble() {
		return Double.parseDouble(nextToken());
	}

	void My_Assert(boolean b, String s) {
		if (!b)
			throw new Error("Assertion " + s);
	}

	final int NMAX = (int) 1e5;
	final int AMAX = (int) 1e9;
	final int LMAX = (int) 1e5;
	
	int[] num;
	int A, B;

	private void solve() {
		int n = nextInt();
		int k = nextInt();
		My_Assert(1 <= n && n <= NMAX, "n is out of range: " + n);
		My_Assert(0 <= k && k <= n, "k is out of range: " + k);
		int[] a = new int[n];
		for (int i = 0; i < n; i++) {
			a[i] = nextInt();
			My_Assert(1 <= a[i] && a[i] <= AMAX, "a[" + i
					+ "] is out of range: " + a[i]);
		}

		A = nextInt();
		B = nextInt();
		My_Assert(1 <= A && A <= AMAX, "A is out of range: " + A);
		My_Assert(1 <= B && B <= AMAX, "B is out of range: " + B);
		My_Assert(0 <= B - A && B - A <= LMAX, "B - A is out of range: "
				+ (B - A));
		
		num = new int[B - A + 1];
		
		Arrays.sort(a);
		
		int prev = -1;
		int cur = 1;
		
		for (int i = 0; i < n; i++) {
			if (prev == -1)
				prev = a[i];
			else if (a[i] == prev)
				cur++;
			else {
				mark(prev, cur);
				prev = a[i];
				cur = 1;
			}
		}
		
		mark(prev, cur);
		
		int ans = 0;
		for (int u : num)
			if (u == k)
				ans++;
		
		out.println(ans);

	}

	private void mark(int a, int cur) {
		int u = A;
		if (u % a == 0)
			u -= a;
		u += a - A % a;
		for (; u <= B; u += a) {
			num[u - A] += cur;
		}
		
	}
}