'use strict';
function main(stdin) {
  const input = stdin.split(' ').map(v => { return parseInt(v, 10) });
  const R = input[0];
  const G = input[1];
  const B = input[2];
  const N = input[3];

  let ans = 0;

  for (let r = 0; r <= N; r += R) {
    for (let g = 0; g <= N - r; g += G) {
      for (let b = 0; b <= N - r - g; b += B) {
        if (r + g + b === N) ++ans;
      }
    }
  }

  console.log(ans);
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));
