r, g, b, N = gets.chomp.split.map(&:to_i)
ans=0
ra, rb=N.divmod(r)
for ri in 0..ra do
  ga, gb=(N-ri*r).divmod(g)
  for gi in 0..ga do
    ba, bb=(N-ri*r-gi*g).divmod(b)
    ans += 1 if bb == 0
  end
end
p ans
