#include <iostream>
#include <math.h>
using namespace std;
int nzs(int a, int b, int c)
{
	int s = 1;
	for(int i = 2; a > 1 || b > 1 || c > 1; i++)
		while(a % i == 0 || b % i == 0 || c % i == 0)
		{
			if(a % i == 0) a /= i;
			if(b % i == 0) b /= i;
			if(c % i == 0) c /= i;
			s *= i;
		}
	return s;
}
int main()
{
	long long p, q, r, l, d, s = 0;
	cin >> p >> q >> r >> l >> d;
	if(p*q+p*r+q*r > p*q*r) cout << 0;
	else if(p*q+p*r+q*r < p*q*r) 
	{
		for(long long i = min((long long)127, l); i <= min((long long)126, d); i++)
			if(ceil((long double)i/p) + ceil((long double)i/q) + ceil((long double)i/r) <= i) s++;
		if(d > 126) s += d - 126;
		cout << s;
	}
	else
	{
		int f = nzs(p, q, r);
		if(l % f == 0) cout << d / f - l / f + 1;
		else cout << d / f - l / f;
	}
}