#include <iostream>
#include <math.h>
using namespace std;
int main()
{
	long long p, q, r, l, d, s = 0;
	cin >> p >> q >> r >> l >> d;
	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;
}