str1 = gets.split
R,G,B,N = str1[0].to_i, str1[1].to_i, str1[2].to_i, str1[3].to_i

answer = 0

for x in 0..(N/R)
  for y in 0..((N-R*x)/G)
    if (N-R*x-G*y)%B == 0
      answer += 1
    end
  end
end

puts answer