#include <bits/stdc++.h>
using namespace std;
int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    long double p,q,r,L,D,N = 0,S;
    long long int Q;
    cin >> p >> q >> r >> L >> D;
    S = min(D, p*q*r);
    for(long long i = L; i <= S; ++i) {
        if(ceil(i/p) + ceil(i/q) + ceil(i/r) <= i) N++;
    }
    Q = (long long) N + (long long) D - (long long) S;
    cout << Q;
    return 0;
}