#include <stdio.h>
#include <stdlib.h>

int main()
{
    long long int l,k,i;
    unsigned p,r,q,z,y,x,br=0;
    double a,b,c;
    scanf("%d %d %d %lld %lld",&p,&q,&r,&l,&k);
    for(i=l;i<=k;i++)
    {
        a=(double)i/p;
        z=a;
        if(a-z!=0)
            z++;
        b=(double)i/q;
        y=b;
        if(b-y!=0)
            y++;
        c=(double)i/r;
        x=c;
        if(c-x!=0)
            x++;
        if(z+y+x<=i)
            br++;
    }
    printf("%u",br);
}