#!/usr/bin/env python3

from itertools import product

import sys

 

 

def solve(AA: int, BB: int, CC: int, XX: int):

    print((sum(

        1

        for a, b, c in product(list(range(AA + 1)), list(range(BB + 1)), list(range(CC + 1)))

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

    )))

 

 

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 = eval(input())

b = eval(input())

c = eval(input())

x = eval(input())



cache = {}



def d(a, b, c, r):

    if r == 0: return 1

    if r < 0: return 0

    if (a, b, c, r) in cache: return cache[(a, b, c, r)]

    s = 0

    if a > 0: s += d(a - 1, b, c, r - 500)

    if b > 0: s += d(0, b - 1, c, r - 100)

    if c > 0: s += d(0, 0, c - 1, r - 50)

    cache[(a, b, c, r)] = s

    return s



print(d(a, b, c, x))

#!/usr/bin/env python3
from itertools import product
import sys


def solve(AA: int, BB: int, CC: int, XX: int):
    print(
        (
            sum(
                1
                for a, b, c in product(
                    list(range(AA + 1)), list(range(BB + 1)), list(range(CC + 1))
                )
                if a * 500 + b * 100 + c * 50 == XX
            )
        )
    )


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 = eval(input())
b = eval(input())
c = eval(input())
x = eval(input())
cache = {}


def d(a, b, c, r):
    if r == 0:
        return 1
    if r < 0:
        return 0
    if (a, b, c, r) in cache:
        return cache[(a, b, c, r)]
    s = 0
    if a > 0:
        s += d(a - 1, b, c, r - 500)
    if b > 0:
        s += d(0, b - 1, c, r - 100)
    if c > 0:
        s += d(0, 0, c - 1, r - 50)
    cache[(a, b, c, r)] = s
    return s


print(d(a, b, c, x))

-#!/usr/bin/env python3 -from itertools import product -import sys +a = eval(input()) +b = eval(input()) +c = eval(input()) +x = eval(input()) +cache = {} -def solve(AA: int, BB: int, CC: int, XX: int): -    print( -        ( -            sum( -                1 -                for a, b, c in product( -                    list(range(AA + 1)), list(range(BB + 1)), list(range(CC + 1)) -                ) -                if a * 500 + b * 100 + c * 50 == XX -            ) -        ) -    ) +def d(a, b, c, r): +    if r == 0: +        return 1 +    if r < 0: +        return 0 +    if (a, b, c, r) in cache: +        return cache[(a, b, c, r)] +    s = 0 +    if a > 0: +        s += d(a - 1, b, c, r - 500) +    if b > 0: +        s += d(0, b - 1, c, r - 100) +    if c > 0: +        s += d(0, 0, c - 1, r - 50) +    cache[(a, b, c, r)] = s +    return s -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() +print(d(a, b, c, x))