#!/usr/bin/ruby
# encoding: utf-8

# B - RGB Boxes 

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

ans = 0

(0..N).each do |i|
  (0..N).each do |j|
    if ((N - R*i - G*j)%B == 0) && ((N - R*i - G*j)/B >= 0) then
        ans += 1
        #puts "[#{i},#{j},#{k}}"
    end
  end
end

puts ans
