function Main(input) {
    lines = input.split("\n")[0].split(" ")
    r = lines[0]
    g = lines[1]
    b = lines[2]
    n = lines[3]
    rn = gn = 0;
    ans = 0
    while(n - r * rn >= 0) {
        gn = 0
        while((n - r * rn) - g * gn >= 0) {
          if (((n - r * rn) - g * gn) % b == 0) {
            ans++
          }
          gn++
        }
        rn++
    }
    console.log(ans);
}
Main(require("fs").readFileSync("/dev/stdin", "utf8"));
