"use strict";
    
const main = arg => {
    arg = arg.trim().split("\n");
    const R = ~~arg[0].split(" ")[0];
    const G = ~~arg[0].split(" ")[1];
    const B = ~~arg[0].split(" ")[2];
    const N = ~~arg[0].split(" ")[3];
    
    const Ra = Math.floor(N / R);
    const Ga = Math.floor(N / G);
    const Ba = Math.floor(N / B);
    
    let cnt = 0;
    
    for(let i=0; i<=Ra; i++) {
        for(let j=0; j<=Ga; j++) {
            for(let k=0; k<=Ba; k++) {
                if((R * i) + (G * j) + (B * k) === N) {
                    cnt++;
                }
        
            }
        }
    }
    
    console.log(cnt);
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));