#include <bits/stdc++.h>
using namespace std;

int nzs(int a, int b)
{
    int c;

    if(a<b)
    {
        c=b;
        b=a;
        a=c;
    }

    if(a%b == 0)
    {
        c=b;
    }
    else
    {
        c=nzs(b, a%b);
    }

    c=a*b/c;

    return c;
}

int main()
{
    int p;
    int q;
    int r;
    int L;
    int D;
    int nzs1;
    int nzs2;
    int nzs3;

    int br=0;
    int i=1;

    cin >> p >> q >> r >> L >> D;

    nzs1 = nzs(p, q);
    nzs2 = nzs(q, r);
    nzs3 = nzs(p, r);

    while(i * nzs1 <= D)
    {
        if(i * nzs1 >= L)
        {
            br++;
        }
        i++;
    }

    while(i * nzs2 <= D)
    {
        if(i * nzs2 >= L)
        {
            br++;
        }
        i++;
    }

    while(i * nzs3 <= D)
    {
        if(i * nzs3 >= L)
        {
            br++;
        }
        i++;
    }

    cout << br;

    return 0;
}