A = int(eval(input()))

B = int(eval(input()))

C = int(eval(input()))

X = int(eval(input()))



res = 0



for a in range(1 + A):

  for b in range(1 + B):

    for c in range(1 + C):

      if a*500 + b*100 + 50*c == X:

        res += 1



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

B = int(eval(input()))

C = int(eval(input()))

X = int(eval(input()))



res = 0



for a in range(A+1):

  for b in range(B+1):

    for c in range(C+1):

      if a*500 + 100*b + c*50 == X:

        res += 1

        

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

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

-for a in range(1 + A): -    for b in range(1 + B): -        for c in range(1 + C): -            if a * 500 + b * 100 + 50 * c == X: +for a in range(A + 1): +    for b in range(B + 1): +        for c in range(C + 1): +            if a * 500 + 100 * b + c * 50 == X: