local ior = io.input()
local r, g, b, n = ior:read("*n", "*n", "*n", "*n")
local cnt = 0
for i = 0, n do
  for j = 0, n - i do
    local k = n - i - j
    if i % r == 0 and j % g == 0 and k % b == 0 then cnt = cnt + 1 end
  end
end
print(cnt)
