# -*- coding: utf-8 -*-

A = int(eval(input()))

B = int(eval(input()))

C = int(eval(input()))

X = int(eval(input()))



_500 = 500

_100 = 100

_50 = 50



count = 0



for a in range(A+1):

    for b in range(B+1):

        for c in range(C+1):

            if X - (a*_500 + b*_100 + c*_50) == 0:

                count = count + 1



print(count)

# -*- coding: utf-8 -*-

A = int(eval(input()))

B = int(eval(input()))

C = int(eval(input()))

X = int(eval(input()))



count = 0

for a in range(A+1):

    for b in range(B+1):

        for c in range(C+1):

            if X - (a*500 + b*100 + c*50) == 0:

                count = count + 1

print(count)

# -*- coding: utf-8 -*-
A = int(eval(input()))
B = int(eval(input()))
C = int(eval(input()))
X = int(eval(input()))
_500 = 500
_100 = 100
_50 = 50
count = 0
for a in range(A + 1):
    for b in range(B + 1):
        for c in range(C + 1):
            if X - (a * _500 + b * _100 + c * _50) == 0:
                count = count + 1
print(count)

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

-_500 = 500 -_100 = 100 -_50 = 50 -            if X - (a * _500 + b * _100 + c * _50) == 0: +            if X - (a * 500 + b * 100 + c * 50) == 0: