"use strict";
function main(input) {
  const args = input.split(" ");

  const R = parseInt(args[0]);
  const G = parseInt(args[1]);
  const B = parseInt(args[2]);
  const N = parseInt(args[3]);

  const countR = Math.floor(N / R);
  const countG = Math.floor(N / G);

  let valueRG = 0;
  let ans = 0;

  for(let i = 0; i <= countR; i++) {
      for(let j = 0; j <= countG; j++) {
          valueRG = R * i + G * j;
          if(N < valueRG) continue;
          if((N - valueRG) === 0 || (N - valueRG) % B === 0) {
              ans ++;
          }
      }
  }

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