console.log((args=>{
  const [R,G,B,N] = args.trim().split(' ').map(v=>v|0);
  let count = 0;
  for ( let r = 0; r <= N; r+=R ) {
    for ( let g = 0; r+g <= N; g+=G ) {
      if ( (N-r-g)%B === 0 ) count++;
    }
  }
  return `${count}`;
})(require('fs').readFileSync('/dev/stdin', 'utf8')));
