#087 B Coins

A =int(eval(input()))

B =int(eval(input()))

C =int(eval(input()))

X =int(eval(input()))

ans =0

for i in range(A+1):

    for j in range(B+1):

        for k in range(C+1):

            if 500 * i + 100 * j + 50 * k ==X:      

                ans+=1

print(ans)
# B - Coins

A=int(eval(input()))

B=int(eval(input()))

C=int(eval(input()))

X=int(eval(input()))

cnt = 0

for a in range(0,A+1):

    for b in range(0,B+1):

        for c in range(0,C+1):

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

                cnt+=1

print(cnt)
# 087 B Coins
A = int(eval(input()))
B = int(eval(input()))
C = int(eval(input()))
X = int(eval(input()))
ans = 0
for i in range(A + 1):
    for j in range(B + 1):
        for k in range(C + 1):
            if 500 * i + 100 * j + 50 * k == X:
                ans += 1
print(ans)

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

-# 087 B Coins +# B - Coins -ans = 0 -for i in range(A + 1): -    for j in range(B + 1): -        for k in range(C + 1): -            if 500 * i + 100 * j + 50 * k == X: -                ans += 1 -print(ans) +cnt = 0 +for a in range(0, A + 1): +    for b in range(0, B + 1): +        for c in range(0, C + 1): +            if a * 500 + b * 100 + c * 50 == X: +                cnt += 1 +print(cnt)