#include<bits/stdc++.h>
#define rep(i,x,y) for (int i=(x);i<=(y);i++)

using namespace std;

int r,g,b,n,ans;

int main(){
	scanf("%d%d%d%d",&r,&g,&b,&n);
	rep (i,0,n)
		rep (j,0,n-i){
			int k=n-i-j;
			ans+=(i%r==0&&j%g==0&&k%b==0);
		}
	cout<<ans;
	return 0;
}