A = int(eval(input()))

B = int(eval(input()))

C = int(eval(input()))

X = int(eval(input()))



A_list = [500*i for i in range(A+1)]

B_list = [100*i for i in range(B+1)]

C_list = [50*i for i in range(C+1)]

sum_list = []



for i in A_list:

    for j in B_list:

        i_j = i + j

        for k in C_list:

            sum_list.append(i_j + k)



result = 0

for i in sum_list:

    if i == X:

        result += 1



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

B = int(eval(input()))

C = int(eval(input()))

X = int(eval(input()))



A_list = [500*i for i in range(A+1)]

B_list = [100*i for i in range(B+1)]

C_list = [50*i for i in range(C+1)]



result = 0



for i in A_list:

    for j in B_list:

        i_j = i + j

        for k in C_list:

            if i_j + k == X:

                result += 1



print(result)
A = int(eval(input()))
B = int(eval(input()))
C = int(eval(input()))
X = int(eval(input()))
A_list = [500 * i for i in range(A + 1)]
B_list = [100 * i for i in range(B + 1)]
C_list = [50 * i for i in range(C + 1)]
sum_list = []
for i in A_list:
    for j in B_list:
        i_j = i + j
        for k in C_list:
            sum_list.append(i_j + k)
result = 0
for i in sum_list:
    if i == X:
        result += 1
print(result)

A = int(eval(input()))
B = int(eval(input()))
C = int(eval(input()))
X = int(eval(input()))
A_list = [500 * i for i in range(A + 1)]
B_list = [100 * i for i in range(B + 1)]
C_list = [50 * i for i in range(C + 1)]
result = 0
for i in A_list:
    for j in B_list:
        i_j = i + j
        for k in C_list:
            if i_j + k == X:
                result += 1
print(result)

-sum_list = [] +result = 0 -            sum_list.append(i_j + k) -result = 0 -for i in sum_list: -    if i == X: -        result += 1 +            if i_j + k == X: +                result += 1