r,g,b,n = gets.split.map(&:to_i)
ans=0
x=(n/r.to_f).ceil
for i in 0..x
    y=n-i*r
    if y==0
        ans+=1
        next
    elsif y<0
        next
    end
    y=(y/g.to_f).ceil
    for j in 0..y
        z=n-i*r-j*g
        if z==0
            ans+=1
            next
        elsif z<0
            next
        end
        if (z%b).zero?
            ans+=1
        end
    end
end
puts ans