import java.util.*; public class No546 { public static void main(String[] args) { try (final Scanner sc = new Scanner(System.in)) { int n = sc.nextInt(); int l = sc.nextInt(); int h = sc.nextInt(); int[] xs = new int[n]; for (int i = 0; i < n; i++) { xs[i] = sc.nextInt(); } long ans = 0; for (int i = 1; i < 1<>>j&1)==1) { x = lcm(x, xs[j]); if (x > h) x = h + 1; s = -s; } ans += Integer.bitCount(i) * s * (h/x - (l-1)/x); } System.out.println(ans); } } static long gcd(long n, long r) { return r == 0 ? n : gcd(r, n % r); } static long lcm(long n, long r) { return n/gcd(n,r)*r; } static void dump(Object... objects) { System.err.println(Arrays.deepToString(objects)); } }