Go: package main

import (
	"bufio"
	"fmt"
	"os"
	"strconv"
	"strings"
)

func main() {
	io := NewIo()
	defer io.Flush()
	for {
		n, l, r := io.NextInt(), io.NextInt(), io.NextInt()
		if n == 0 {
			break;
		}
		A := make([]int, n)
		for i := 0; i < n; i++ {
			A[i] = io.NextInt()
		}
		cnt := 0
		for x := l; x <= r; x++ {
			for i := 0; i < n; i++ {
				if x%A[i] == 0 {
					if i%2 == 0 {
						cnt++
					}
					goto SKIP
				}
			}
			if n%2 == 0 {
				cnt++
			}
		SKIP:
		}
		io.Println(cnt)
	}
}

// I/O template
type Io struct {
	reader    *bufio.Reader
	writer    *bufio.Writer
	tokens    []string
	nextToken int
}

func NewIo() *Io {
	return &Io{
		reader: bufio.NewReader(os.Stdin),
		writer: bufio.NewWriter(os.Stdout),
	}
}

func (io *Io) Flush() {
	err := io.writer.Flush()
	if err != nil {
		panic(err)
	}
}

func (io *Io) NextLine() string {
	var buff []byte
	for {
		line, isPrefix, err := io.reader.ReadLine()
		if err != nil {
			panic(err)
		}
		buff = append(buff, line...)
		if !isPrefix {
			break
		}
	}
	return string(buff)
}

func (io *Io) Next() string {
	for io.nextToken >= len(io.tokens) {
		line := io.NextLine()
		io.tokens = strings.Fields(line)
		io.nextToken = 0
	}
	s := io.tokens[io.nextToken]
	io.nextToken++
	return s
}

func (io *Io) NextInt() int {
	i, err := strconv.Atoi(io.Next())
	if err != nil {
		panic(err)
	}
	return i
}

func (io *Io) NextFloat() float64 {
	i, err := strconv.ParseFloat(io.Next(), 64)
	if err != nil {
		panic(err)
	}
	return i
}

func (io *Io) Println(a ...interface{}) {
	fmt.Fprintln(io.writer, a...)
}

func (io *Io) Printf(format string, a ...interface{}) {
	fmt.Fprintf(io.writer, format, a...)
}

func (io *Io) PrintIntSlice(a []int) {
	b := []interface{}{}
	for _, x := range a {
		b = append(b, x)
	}
	io.Println(b...)
}

func (io *Io) PrintStringSlice(a []string) {
	b := []interface{}{}
	for _, x := range a {
		b = append(b, x)
	}
	io.Println(b...)
}

func Log(name string, value interface{}) {
	fmt.Fprintf(os.Stderr, "%s=%+v\n", name, value)
}

func ExampleIo() {
	io := NewIo()
	defer io.Flush()
	a := make([]int, 0, 3)
	a[0], a[1], a[2] = io.NextInt(), io.NextInt(), io.NextInt()
	io.Println(a)
	io.PrintIntSlice(a)
	Log("io", a)
}

C++: #include <bits/stdc++.h>
using namespace std;
int n,l,r,ans=0,A[55]={};

void solve(int x){
  for(int i=1;i<=n;i++){
    if(x%A[i]==0){
      if(i%2==0);
      else ans++;
      return;
    }
  }
  if(n%2==0) ans++;
  else;
  return;
}

int main(){
  while(1){
    cin >> n >> l >> r;
    ans=0;
    if(n==0 && l==0 && r==0) break;
    for(int i=1;i<=n;i++) cin >> A[i];
    for(int x=l;x<=r;x++) solve(x);
    cout << ans << endl;
  }
  return 0;
}

C++: #include <algorithm>
#include <iostream>
#include <vector>
using namespace std;

int main() {
    int n, l, r;
    while (cin >> n >> l >> r, n) {
        int cnt = 0;
        vector<int> a(n);
        for (int &ai: a) cin >> ai;
        for (int x = l; x <= r; x++) {
            int idx = n;
            for (int i = 0; i < n; i++) if (x % a[i] == 0) { idx = i; break; }
            if (idx % 2 == 0) cnt += 1;
        }
        cout << cnt << endl;
    }
    return 0;
}

C++: #include <bits/stdc++.h>
using namespace std;
#define FOR(i, a, b) for (int i = (a); i < (b); ++i)
#define REP(i, n) FOR (i, 0, n)
#define ALL(v) (v).begin(), (v).end()
#define fi first
#define se second
template <typename A, typename B> inline bool chmax(A &a, B b) {if (a < b) {a = b; return 1;} return 0;}
template <typename A, typename B> inline bool chmin(A &a, B b) {if (a > b) {a = b; return 1;} return 0;}
typedef long long ll;
typedef pair<int, int> pii;
const ll INF = 1e9+100;
const bool debug = 0;
/****************************/


int main(){
	int n, l, r;
	int a[50];
	while (cin >> n >> l >> r, n || l || r) {
		REP(i, n) scanf("%d", a + i);
		
		int ans = 0;
		
		FOR(x, l, r + 1) {
			int pos = -1;
			REP(i, n) {
				if (x % a[i] == 0) {
					pos = i;
					break;
				}
			}
			
			if (pos != -1) {
				pos++;
				if (pos & 1) ans++;
			}
			else {
				if (!(n & 1)) ans++;
			}
		}
		
		if (debug) printf("@ ");
		cout << ans << endl;
	}
	return 0;
}

// C

C++: #include<bits/stdc++.h>
using namespace std;
using Int = long long;

signed main(){
  Int n,l,r;
  while(cin>>n>>l>>r,n||l||r){
    vector<Int> a(n);
    for(Int i=0;i<n;i++) cin>>a[i];
    auto is_uruu=[&](Int x)->Int{
      for(Int i=0;i<n;i++){
	if(x%a[i]==0) return (i%2==0);
      }
      return (n%2==0);
    };
    Int ans=0;
    for(Int i=l;i<=r;i++) ans+=is_uruu(i);
    cout<<ans<<endl;
  }
  return 0;
}

C++: #include <bits/stdc++.h>
#define rep(i,n) for(int i=0;i<n;i++)
#define REP(i,a,b) for(int i=a;i<=b;i++)
using namespace std;
const string space=" ";
int main(){
    while(1){
        int n,l,r;
        cin>>n>>l>>r;
        if(!n)break;
        int a[n];
        rep(i,n)cin>>a[i];
        int ans=0;
        REP(i,l,r){
            int j;
            for(j=0;j<n;j++){
                if(i%a[j]==0){
                    if(j%2==0)ans++;
                    break;
                }
            }
            if(j==n&&n%2==0)ans++;
        }
        cout<<ans<<endl;
    }
    return 0;
}

C++: #include <bits/stdc++.h>
using namespace std;

int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  
  while (true) {
    int n, l, r;
    cin >> n >> l >> r;
    if (n + l + r == 0) return 0;
    
    vector<int> a(n);
    for (int i = 0; i < n; i++) cin >> a.at(i);
    
    int ans = 0;
    for (int i = l; i <= r; i++) {
      bool flag = false;
      for (int j = 0; j < n; j++) {
        if (i % a.at(j) == 0 && j % 2 == 0) {
          ans++;
          flag = true;
          break;
        }
        else if (i % a.at(j) == 0) {
          flag = true;
          break;
        }
      }
      if (!flag) {
        if (n % 2 == 0) ans++;
      }
    }
    
    cout << ans << '\n';
  }
}

C++: #include <bits/stdc++.h>

#define rep(i, n) for(int i = 0; i < n; i++)

typedef long long ll;
using namespace std;
int mod = 1000000007;

int main(void){
    int N, L, R;
    vector<int> ans;
    while(true){
        int res = 0;
        cin >> N >> L >> R;
        if(N == 0) break;
        vector<int> A(N);
        rep(i, N) cin >> A[i];
        for(int i = L; i <= R; i++){
            int idx = 0;
            while(i % A[idx] > 0){
                idx++;
                if(idx == N) break;
            }
            if(idx == N){
                if(N % 2 == 0) res++;
            }
            else if(idx % 2 == 0) res++;
        }
        ans.push_back(res);
    }
    rep(i, ans.size()) cout << ans[i] << endl;
    return 0;
}

C++: #include <bits/stdc++.h>
#define int long long
#define endl '\n'
#define FOR(i, a, n) for (int i = (a); i < (n); ++i)
#define REP(i, n) FOR(i, 0, n)
using namespace std;

void _main() {
    int n, l, r;
    while (cin >> n >> l >> r, n) {
        vector<int> A(n);
        REP (i, n) cin >> A[i];
        A.push_back(1);
        int ans = 0;
        FOR (y, l, r + 1) {
            REP (i, A.size()) {
                if (y % A[i] == 0) {
                    if (i % 2 == 0) ans++;
                    break;
                }
            }
        }
        cout << ans << endl;
    }
}

signed main() {
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    cout << fixed << setprecision(10);
    _main();
    return 0;
}