'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) {
      if ((N - r - g) % B === 0) ++ans;
    }
  }

  console.log(ans);
}

main(require('fs').readFileSync('/dev/stdin', 'utf8'));
