a, b, c, x = [int(eval(input())) for _ in range(4)]



count = 0

for i in range(a, -1, -1):

    i_tmp = i * 500

    for j in range(b, -1, -1):

        j_tmp = j * 100 + i_tmp

        for k in range(c, -1, -1):

            sum = k * 50 + j_tmp

            if sum == x:

                count += 1



print(count)
a, b, c, x = [int(eval(input())) for _ in range(4)]



count = 0

for i in range(a, -1, -1):

    i_tmp = i * 500

    if i_tmp > x:

        continue

    for j in range(b, -1, -1):

        j_tmp = j * 100 + i_tmp

        if j_tmp > x:

            continue

        for k in range(c, -1, -1):

            sum = k * 50 + j_tmp

            if sum == x:

                count += 1



print(count)
a, b, c, x = [int(eval(input())) for _ in range(4)]
count = 0
for i in range(a, -1, -1):
    i_tmp = i * 500
    for j in range(b, -1, -1):
        j_tmp = j * 100 + i_tmp
        for k in range(c, -1, -1):
            sum = k * 50 + j_tmp
            if sum == x:
                count += 1
print(count)

a, b, c, x = [int(eval(input())) for _ in range(4)]
count = 0
for i in range(a, -1, -1):
    i_tmp = i * 500
    if i_tmp > x:
        continue
    for j in range(b, -1, -1):
        j_tmp = j * 100 + i_tmp
        if j_tmp > x:
            continue
        for k in range(c, -1, -1):
            sum = k * 50 + j_tmp
            if sum == x:
                count += 1
print(count)

+    if i_tmp > x: +        continue +        if j_tmp > x: +            continue