#include<iostream>
using namespace std;
int R,G,B,N;
long ans;
int main()
{
	cin>>R>>G>>B>>N;
	for(int i=0;i*R<=N;i++)for(int j=0;i*R+j*G<=N;j++)
	{
		int k=N-i*R-j*G;
		if(k>=0&&k<=B*N&&k%B==0)ans++;
	}
	cout<<ans<<endl;
}
