local R,G,B,N = io.read("n", "n", "n", "n")

local cnt = 0
for r=0,N do
    local lim = (N - R*r) / G
    --print(lim)
    for g=0,lim do
        local b = (N - R*r - G*g) / B
        if b >= 0 and b == math.floor(b) then
            cnt = cnt + 1
            --print(r,g,b)
        end
    end
end
print(cnt)