local A, B, C = io.read("*n", "*n", "*n")
local price = io.read("*n")
local count = 0

for a = 0, A do
    for b = 0, B do
        for c = 0, C do
            if 500*a + 100*b + 50*c == price then
                count = count + 1
            end
        end
    end
end
print(count)