let input = readLine()!.characters.split(" ").map{Int(String($0))}
let (R, G, B, N) = (input[0], input[1], input[2], input[3])
var ans = 0
for r in 0...N {
    for g in 0...N {
        let b = N - (r*R + g*G)
        if (b >= 0) && (b % B == 0) {
            ans += 1
        }
    }
}
print(ans)