#include<bits/stdc++.h>

using namespace std;

int main()
{
	long long p, q, r, l, d, ans = 0, sum = 0;
	cin >> p >> q >> r >> l >> d;
	for(int i = l; i <= d; i++)
	{
		if(i % p == 0) sum = i / p;
		else sum = (i / p) + 1;
		if(i % q == 0) sum += i / q;
		else sum += i / q + 1;
		if(i % r == 0) sum += i / r;
		else sum += i / r + 1;
		if(sum <= i) ans++;
	}
	cout << ans;
	return 0;
}