A = int(eval(input()))

B = int(eval(input()))

C = int(eval(input()))

X = int(eval(input()))

count=0

for a in [a*500 for a in range(A + 1)]:

    for j in range(B + 1):

        for k in range(C + 1):

            if a + 100*j + 50*k == X:

                count += 1

print(count)
A = int(eval(input()))

B = int(eval(input()))

C = int(eval(input()))

X = int(eval(input()))

count=0

for a in [a*500 for a in range(A + 1)]:

    for b in [b*100 for b in range(B + 1)]:

        for k in range(C + 1):

            if a + b + 50*k == X:

                count += 1

print(count)
A = int(eval(input()))
B = int(eval(input()))
C = int(eval(input()))
X = int(eval(input()))
count = 0
for a in [a * 500 for a in range(A + 1)]:
    for j in range(B + 1):
        for k in range(C + 1):
            if a + 100 * j + 50 * k == X:
                count += 1
print(count)

A = int(eval(input()))
B = int(eval(input()))
C = int(eval(input()))
X = int(eval(input()))
count = 0
for a in [a * 500 for a in range(A + 1)]:
    for b in [b * 100 for b in range(B + 1)]:
        for k in range(C + 1):
            if a + b + 50 * k == X:
                count += 1
print(count)

-    for j in range(B + 1): +    for b in [b * 100 for b in range(B + 1)]: -            if a + 100 * j + 50 * k == X: +            if a + b + 50 * k == X: