def check(a, b, c, x):

    test = 500 * a + 100 * b + 50 * c

    if test > x:

        return 0

    elif test == x:

        return 1

    else:

        return 0



def resolve():

    a = int(eval(input()))

    b = int(eval(input()))

    c = int(eval(input()))

    x = int(eval(input()))

    

    result = 0

    #これは総当たり…

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

        if 500 * i > x:

            continue

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

            if 500 * i + 100 * j > x:

                continue

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

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

                    continue

                result += check(i, j, k, x)

    print(result)

resolve()
def resolve():

    a = int(eval(input()))

    b = int(eval(input()))

    c = int(eval(input()))

    x = int(eval(input()))

    count = 0

    n = 0

    for i in range(a+1):

        ni = 500*i

        if ni > x:

            continue

        for j in range(b+1):

            nj = ni + 100*j

            if nj > x:

                continue

            for k in range(c+1):

                nk = nj + 50*k

                if nk != x:

                    continue

                elif nk == x:

                    count += 1

    print(count)

resolve()
def check(a, b, c, x):
    test = 500 * a + 100 * b + 50 * c
    if test > x:
        return 0
    elif test == x:
        return 1
    else:
        return 0


def resolve():
    a = int(eval(input()))
    b = int(eval(input()))
    c = int(eval(input()))
    x = int(eval(input()))
    result = 0
    # これは総当たり…
    for i in range(a, -1, -1):
        if 500 * i > x:
            continue
        for j in range(b, -1, -1):
            if 500 * i + 100 * j > x:
                continue
            for k in range(c, -1, -1):
                if 500 * i + 100 * j + 50 * k > x:
                    continue
                result += check(i, j, k, x)
    print(result)


resolve()

def resolve():
    a = int(eval(input()))
    b = int(eval(input()))
    c = int(eval(input()))
    x = int(eval(input()))
    count = 0
    n = 0
    for i in range(a + 1):
        ni = 500 * i
        if ni > x:
            continue
        for j in range(b + 1):
            nj = ni + 100 * j
            if nj > x:
                continue
            for k in range(c + 1):
                nk = nj + 50 * k
                if nk != x:
                    continue
                elif nk == x:
                    count += 1
    print(count)


resolve()

-def check(a, b, c, x): -    test = 500 * a + 100 * b + 50 * c -    if test > x: -        return 0 -    elif test == x: -        return 1 -    else: -        return 0 - - -    result = 0 -    # これは総当たり… -    for i in range(a, -1, -1): -        if 500 * i > x: +    count = 0 +    n = 0 +    for i in range(a + 1): +        ni = 500 * i +        if ni > x: -        for j in range(b, -1, -1): -            if 500 * i + 100 * j > x: +        for j in range(b + 1): +            nj = ni + 100 * j +            if nj > x: -            for k in range(c, -1, -1): -                if 500 * i + 100 * j + 50 * k > x: +            for k in range(c + 1): +                nk = nj + 50 * k +                if nk != x: -                result += check(i, j, k, x) -    print(result) +                elif nk == x: +                    count += 1 +    print(count)