#include <iostream>
#include <cmath>

using namespace std;

int main()
{
    long long int p,q,r,L,R,o=0;
    cin>>p>>q>>r>>L>>R;
    for(long long int i=L;i<=R;i++){
        cout<<i<<endl;
        long int k=i/p+(i%p !=0), m=i/q+(i%q!=0), h=i/r+(i%r!=0);
        k=k+m+h;
        if(k<=i)
            o++;
    }
    cout<<o;
    return 0;
}