R, G, B, N = gets.split.map(&:to_i)
ans = 0
(0..(N / R)).each do |r|
  (0..(N / G)).each do |g|
    rest = N - (R * r + G * g)
    if rest >= 0 && rest % B == 0
      ans += 1
    end
  end
end
puts ans
