#include <iostream>
#include <cmath>
using namespace std;

int main()
{
    long double  p,q,r,L,D;
    long  int brLub,komb=0;
    cin>>p>>q>>r>>L>>D;
    while(L<=D)
    {
        brLub=ceil(L/p)+ceil(L/q)+ceil(L/r);
        if(brLub<=L)
        {
            komb++;
        }
        L++;
    }
    cout<<komb;
}