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