A = int(eval(input())) #500

B = int(eval(input())) #100

C = int(eval(input())) #50

X = int(eval(input())) #sum

count = 0



for a in range(A + 1):

    for b in range(B + 1):

        for c in range(C + 1):

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

                count += 1



print(count)

import sys

input = sys.stdin.readline



A = int(eval(input())) #500

B = int(eval(input())) #100

C = int(eval(input())) #50

X = int(eval(input())) #sum

count = 0



for a in range(A + 1):

    for b in range(B + 1):

        if 500 * a + 100 * b <= X <= 500 * a + 100 * b + 50 * C:

            count += 1



print(count)

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

import sys

input = sys.stdin.readline
A = int(eval(input()))  # 500
B = int(eval(input()))  # 100
C = int(eval(input()))  # 50
X = int(eval(input()))  # sum
count = 0
for a in range(A + 1):
    for b in range(B + 1):
        if 500 * a + 100 * b <= X <= 500 * a + 100 * b + 50 * C:
            count += 1
print(count)

+import sys + +input = sys.stdin.readline -        for c in range(C + 1): -            if 500 * a + 100 * b + 50 * c == X: -                count += 1 +        if 500 * a + 100 * b <= X <= 500 * a + 100 * b + 50 * C: +            count += 1