#!/usr/bin/env python3

from itertools import product

import sys





def solve(A: int, B: int, C: int, X: int):

    print((sum(

        1

        for a, b, c in product(list(range(A + 1)), list(range(B + 1)), list(range(C + 1)))

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

    )))





def main():

    def iterate_tokens():

        for line in sys.stdin:

            for word in line.split():

                yield word

    tokens = iterate_tokens()

    A = int(next(tokens))  # type: int

    B = int(next(tokens))  # type: int

    C = int(next(tokens))  # type: int

    X = int(next(tokens))  # type: int

    solve(A, B, C, X)





if __name__ == '__main__':

    main()

a = int(eval(input()))

b = int(eval(input()))

c = int(eval(input()))

x = int(eval(input()))

 

ans = 0

 

for xx in range(a+1):

    A = 500*xx

    for y in range(b+1) :

        B = 100*y

        for z in range(c+1):

            C = 50*z

            if x == A+B+C:

                ans += 1

            else:

                continue

 

 

print(ans)
#!/usr/bin/env python3
from itertools import product
import sys


def solve(A: int, B: int, C: int, X: int):
    print(
        (
            sum(
                1
                for a, b, c in product(
                    list(range(A + 1)), list(range(B + 1)), list(range(C + 1))
                )
                if a * 500 + b * 100 + c * 50 == X
            )
        )
    )


def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word

    tokens = iterate_tokens()
    A = int(next(tokens))  # type: int
    B = int(next(tokens))  # type: int
    C = int(next(tokens))  # type: int
    X = int(next(tokens))  # type: int
    solve(A, B, C, X)


if __name__ == "__main__":
    main()

a = int(eval(input()))
b = int(eval(input()))
c = int(eval(input()))
x = int(eval(input()))
ans = 0
for xx in range(a + 1):
    A = 500 * xx
    for y in range(b + 1):
        B = 100 * y
        for z in range(c + 1):
            C = 50 * z
            if x == A + B + C:
                ans += 1
            else:
                continue
print(ans)

-#!/usr/bin/env python3 -from itertools import product -import sys - - -def solve(A: int, B: int, C: int, X: int): -    print( -        ( -            sum( -                1 -                for a, b, c in product( -                    list(range(A + 1)), list(range(B + 1)), list(range(C + 1)) -                ) -                if a * 500 + b * 100 + c * 50 == X -            ) -        ) -    ) - - -def main(): -    def iterate_tokens(): -        for line in sys.stdin: -            for word in line.split(): -                yield word - -    tokens = iterate_tokens() -    A = int(next(tokens))  # type: int -    B = int(next(tokens))  # type: int -    C = int(next(tokens))  # type: int -    X = int(next(tokens))  # type: int -    solve(A, B, C, X) - - -if __name__ == "__main__": -    main() +a = int(eval(input())) +b = int(eval(input())) +c = int(eval(input())) +x = int(eval(input())) +ans = 0 +for xx in range(a + 1): +    A = 500 * xx +    for y in range(b + 1): +        B = 100 * y +        for z in range(c + 1): +            C = 50 * z +            if x == A + B + C: +                ans += 1 +            else: +                continue +print(ans)