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

int main()
{
    long long int l, t, i, m, br = 0, n;
    double p, q, r, b;
    scanf("%lf %lf %lf %lld %lld", &p, &q, &r, &l, &t);
    for(i = l; i <= t; i++){
        n = 0;
        b = i / p;
        m = b;
        if(b - m > 0)
            m ++;
        n += m;
        b = i / q;
        m = b;
        if(b - m > 0)
            m++;
        n += m;
            b = i / r;
        m = b;
        if(b - m > 0)
            m++;
        n += m;
        if(n <= i)
            br++;
        }
    printf("%lld", br);
    return 0;
}