R, G, B, N = gets.split.map(&:to_f)

r_max = (N / R).floor
cnt = 0
for r in 0..r_max do
    now = N - (R * r)
    g_max = (now / G).floor
    for g in 0..g_max do
        now_g = now - (G * g)
        if now_g % B == 0 then
            cnt += 1
        end
    end
end

puts cnt
