def main(n500, n100, n50, price):

    count = 0

    for i in range(n500 + 1):

        for j in range(n100 + 1):

            for k in range(n50 + 1):

                p = i * 500 + j * 100 + k * 50

                if p == price:

                    count += 1

    print(count)





if __name__ == "__main__":

    n500 = int(eval(input()))

    n100 = int(eval(input()))

    n50 = int(eval(input()))

    price = int(eval(input()))

    main(n500, n100, n50, price)

def main(n500, n100, n50, price):

    count = 0

    for i in range(n500 + 1):

        if i * 500 <= price:

            for j in range(n100 + 1):

                if i * 500 + j * 100 <= price:

                    for k in range(n50 + 1):

                        p = i * 500 + j * 100 + k * 50

                        if p == price:

                            count += 1

    print(count)





if __name__ == "__main__":

    n500 = int(eval(input()))

    n100 = int(eval(input()))

    n50 = int(eval(input()))

    price = int(eval(input()))

    main(n500, n100, n50, price)

def main(n500, n100, n50, price):
    count = 0
    for i in range(n500 + 1):
        for j in range(n100 + 1):
            for k in range(n50 + 1):
                p = i * 500 + j * 100 + k * 50
                if p == price:
                    count += 1
    print(count)


if __name__ == "__main__":
    n500 = int(eval(input()))
    n100 = int(eval(input()))
    n50 = int(eval(input()))
    price = int(eval(input()))
    main(n500, n100, n50, price)

def main(n500, n100, n50, price):
    count = 0
    for i in range(n500 + 1):
        if i * 500 <= price:
            for j in range(n100 + 1):
                if i * 500 + j * 100 <= price:
                    for k in range(n50 + 1):
                        p = i * 500 + j * 100 + k * 50
                        if p == price:
                            count += 1
    print(count)


if __name__ == "__main__":
    n500 = int(eval(input()))
    n100 = int(eval(input()))
    n50 = int(eval(input()))
    price = int(eval(input()))
    main(n500, n100, n50, price)

-        for j in range(n100 + 1): -            for k in range(n50 + 1): -                p = i * 500 + j * 100 + k * 50 -                if p == price: -                    count += 1 +        if i * 500 <= price: +            for j in range(n100 + 1): +                if i * 500 + j * 100 <= price: +                    for k in range(n50 + 1): +                        p = i * 500 + j * 100 + k * 50 +                        if p == price: +                            count += 1