A=io.read("n")
B=io.read("n")
C=io.read("n")
X=io.read("n")
local count=0
for i=0,A do
  for j=0,B do
    for k=0,C do
      if A*500+B*100+C*50==X then
        count=count+1
      end
    end
  end
end
print(count)