#include<math.h>
#include <stdio.h>

int main()
{
    long double p,q,r,l,d,t=0,z;
    int a,b;
    
    scanf("%Lf %Lf %Lf %Lf %Lf",&p,&q,&r,&l,&d);
 
    for(long double i=l;i<=d;i=i+1){
        
        z=ceil(i/p)+ceil(i/q)+ceil(i/r);
        
        if(z<=i) t++;
        
        
    }
    unsigned long long x = t;
    printf("%lld",x);
    
    return 0;
}