#include <bits/stdc++.h>
using namespace std;
int main(){
  int R,G,B,N,ans = 0;
  cin >> R >> G >> B >> N;
  for(int r = 0;r <= (N/R);r++)
    for(int g = 0;g <= (N/G);g++)
      for(int b = 0;b <= (N/B);b++)
        if(R*r+G*g+B*b == N)ans++;
  cout << ans << endl;
  return 0;
}