/// created by ricpe13 ///
#include <bits/stdc++.h>
using namespace std;

int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(nullptr);
    cout.tie(nullptr);
    /////////////////////////////////


    double p,q,r;
  unsigned long long l,k,brojac=0;
    cin >> p >> q >> r >> l >> k;
   unsigned long long u=l;
   unsigned long long z,x,c;
   
    while (u<=k){
        z=u/p;
        x=u/q;
        c=u/r;
        if (ceil(z)+ceil(x)+ceil(c)<=u){
            brojac++;
            u++;
        }
        if (ceil(z)+ceil(x)+ceil(c)>u) {
            u++;
        }
    }
    cout << brojac << endl;
    return 0;
}