#include <iostream>
#include <stdlib.h>
#include <math.h>
#include <vector> 

using namespace std;
int main(int argc, char** argv)
{
	int r,p,q,a,b,c,br;
	vector<int> v;
	vector<int> v2;
	long int l,n;
	br=0;
	cin>>p>>q>>r>>l>>n;
	for (l;l<=n;l++)
	{
		if (l%p==0)
		{
			if(l%q==0)
			{
				br++;
			}
			else
			{
				if(l%r==0)
				{
				br++;
				}
				else
				{
					v.push_back(l);
				}
			}
		}
		else
		{
			if(l%q==0)
			{
				if(l%r==0)
				{
				br++;
				}
				else
				{
				v.push_back(l);
				}
			}
			else
			{
				v.push_back(l);
			}
			
		}
	}
	for (int i=0;i<v.size();i++)
	{
		a=ceil((float)v[i]/p);
		b=ceil((float)v[i]/q);
		c=ceil((float)v[i]/r);
		if (v[i]%p==0)
		{a=v[i]/p;}
		if (v[i]%q ==0)
		{b=v[i]/q;}
		if (v[i]%r ==0)
		{c=v[i]/r;}		
		if((a+b+c)<=v[i])
		br++;
	}
	cout<<br;
	return 0;
}