#!/usr/bin/env python3

# coding=utf-8



import sys



a = int(sys.stdin.readline().strip())

b = int(sys.stdin.readline().strip())

c = int(sys.stdin.readline().strip())

x = int(sys.stdin.readline().strip())

ans = 0

for i in range(a+1):

    for j in range(b+1):

        for k in range(c+1):

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

                ans += 1

print(ans)

def solve(string):

    a, b, c, x = list(map(int, string.split()))

    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

    return str(ans)





if __name__ == '__main__':

    n = 4

    print((solve('\n'.join([eval(input()) for _ in range(n)]))))

#!/usr/bin/env python3
# coding=utf-8
import sys

a = int(sys.stdin.readline().strip())
b = int(sys.stdin.readline().strip())
c = int(sys.stdin.readline().strip())
x = int(sys.stdin.readline().strip())
ans = 0
for i in range(a + 1):
    for j in range(b + 1):
        for k in range(c + 1):
            if i * 500 + j * 100 + k * 50 == x:
                ans += 1
print(ans)

def solve(string):
    a, b, c, x = list(map(int, string.split()))
    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
    return str(ans)


if __name__ == "__main__":
    n = 4
    print((solve("\n".join([eval(input()) for _ in range(n)]))))

-#!/usr/bin/env python3 -# coding=utf-8 -import sys +def solve(string): +    a, b, c, x = list(map(int, string.split())) +    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 +    return str(ans) -a = int(sys.stdin.readline().strip()) -b = int(sys.stdin.readline().strip()) -c = int(sys.stdin.readline().strip()) -x = int(sys.stdin.readline().strip()) -ans = 0 -for i in range(a + 1): -    for j in range(b + 1): -        for k in range(c + 1): -            if i * 500 + j * 100 + k * 50 == x: -                ans += 1 -print(ans) + +if __name__ == "__main__": +    n = 4 +    print((solve("\n".join([eval(input()) for _ in range(n)]))))