## ABC087B - Coins

import sys

input = sys.stdin.readline



a, b, c, x = list(map(int, [input().rstrip() for _ in range(4)]))

count = 0



for i in range(min(a, int(x / 500)) + 1):

    for j in range(min(b, int((x - i * 500) / 100)) + 1):

        for k in range(c + 1):

            if i * 500 + j * 100 + k * 50 > x:

                break

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

                count += 1

print(count)
##### ABC087B - Coins

a, b, c, x = list(map(int, [input().rstrip() for _ in range(4)]))

count = 0



for i in range(min(a, int(x / 500)) + 1):

    for j in range(min(b, int((x - i * 500) / 100)) + 1):

        if (x - i * 500 - j * 100) // 50 <= c and (x - i * 500 - j * 100) % 50 == 0:

            count += 1

print(count)
## ABC087B - Coins
import sys

input = sys.stdin.readline
a, b, c, x = list(map(int, [input().rstrip() for _ in range(4)]))
count = 0
for i in range(min(a, int(x / 500)) + 1):
    for j in range(min(b, int((x - i * 500) / 100)) + 1):
        for k in range(c + 1):
            if i * 500 + j * 100 + k * 50 > x:
                break
            if i * 500 + j * 100 + k * 50 == x:
                count += 1
print(count)

##### ABC087B - Coins
a, b, c, x = list(map(int, [input().rstrip() for _ in range(4)]))
count = 0
for i in range(min(a, int(x / 500)) + 1):
    for j in range(min(b, int((x - i * 500) / 100)) + 1):
        if (x - i * 500 - j * 100) // 50 <= c and (x - i * 500 - j * 100) % 50 == 0:
            count += 1
print(count)

-## ABC087B - Coins -import sys - -input = sys.stdin.readline +##### ABC087B - Coins -        for k in range(c + 1): -            if i * 500 + j * 100 + k * 50 > x: -                break -            if i * 500 + j * 100 + k * 50 == x: -                count += 1 +        if (x - i * 500 - j * 100) // 50 <= c and (x - i * 500 - j * 100) % 50 == 0: +            count += 1