#include #define FOR(i,bg,ed) for(ll i=(bg);i<(ed);i++) #define REP(i,n) FOR(i,0,n) #define MOD 1000000007 //#define int long long using namespace std; typedef long long ll; typedef vector> mat; const int INF = 1e9; signed main() { int N, L, H; int C[15]; cin >> N >> L >> H; REP(i,N) cin >> C[i]; int ans = 0; for (int i=L; i<=H; i++) { int cnt = 0; REP(j,N) if (i % C[j] == 0) cnt++; if (cnt == 1) ans++; } cout << ans << endl; }