var lines = [];
var readline = require('readline');

var rl = readline.createInterface({
    input: process.stdin,
    output: process.stdout,
});

rl.on('line', function (x) {
    lines.push(x);
});

rl.on('close', function () {
    var R = Number(lines[0].split(" ")[0]);
    var G = Number(lines[0].split(" ")[1]);
    var B = Number(lines[0].split(" ")[2]);
    var N = Number(lines[0].split(" ")[3]);

    var ans = 0;
    for (var r = 0; r <= 3000; r++) {
        if (N < r * R) { break; }
        for (var g = 0; g <= 3000; g++) {
            if (N < r * R + g * G) { break; }
            for (var b = 0; b <= 3000; b++) {

                if (R * r + G * g + B * b === N) { ans++; }
            }
        }
    }
    console.log(ans);

});