R, G, B, N = gets.strip.split(/ /).collect(&:to_i)

count = 0

(N / R + 1).times{|r|
    (N / G + 1).times{|g|
        n = N - R * r - G * g
        if (n >= 0) && (n % B == 0)
            count += 1
        end
    }
}

puts count
