# -*- coding: utf-8 -*-



# AtCoder Beginner Contest

# Problem B



if __name__ == '__main__':

    five_hundred_yen_count = int(eval(input()))

    one_hundred_yen_count = int(eval(input()))

    fifty_yen_count = int(eval(input()))

    total_yen = int(eval(input()))



    pattern_count = 0



    for i in range(five_hundred_yen_count + 1):

        for j in range(one_hundred_yen_count + 1):

            for k in range(fifty_yen_count + 1):

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



                if total_yen - summed_yen == 0:

                    pattern_count += 1



    print(pattern_count)

# -*- coding: utf-8 -*-





def main():

    a = int(eval(input()))

    b = int(eval(input()))

    c = int(eval(input()))

    x = int(eval(input()))

    count = 0



    for a in range(a + 1):

        for b in range(b + 1):

            for c in range(c + 1):

                if 500 * a + 100 * b + 50 * c == x:

                    count += 1



    print(count)





if __name__ == '__main__':

    main()

# -*- coding: utf-8 -*-
# AtCoder Beginner Contest
# Problem B
if __name__ == "__main__":
    five_hundred_yen_count = int(eval(input()))
    one_hundred_yen_count = int(eval(input()))
    fifty_yen_count = int(eval(input()))
    total_yen = int(eval(input()))
    pattern_count = 0
    for i in range(five_hundred_yen_count + 1):
        for j in range(one_hundred_yen_count + 1):
            for k in range(fifty_yen_count + 1):
                summed_yen = 500 * i + 100 * j + 50 * k
                if total_yen - summed_yen == 0:
                    pattern_count += 1
    print(pattern_count)

# -*- coding: utf-8 -*-
def main():
    a = int(eval(input()))
    b = int(eval(input()))
    c = int(eval(input()))
    x = int(eval(input()))
    count = 0
    for a in range(a + 1):
        for b in range(b + 1):
            for c in range(c + 1):
                if 500 * a + 100 * b + 50 * c == x:
                    count += 1
    print(count)


if __name__ == "__main__":
    main()

-# AtCoder Beginner Contest -# Problem B +def main(): +    a = int(eval(input())) +    b = int(eval(input())) +    c = int(eval(input())) +    x = int(eval(input())) +    count = 0 +    for a in range(a + 1): +        for b in range(b + 1): +            for c in range(c + 1): +                if 500 * a + 100 * b + 50 * c == x: +                    count += 1 +    print(count) + + -    five_hundred_yen_count = int(eval(input())) -    one_hundred_yen_count = int(eval(input())) -    fifty_yen_count = int(eval(input())) -    total_yen = int(eval(input())) -    pattern_count = 0 -    for i in range(five_hundred_yen_count + 1): -        for j in range(one_hundred_yen_count + 1): -            for k in range(fifty_yen_count + 1): -                summed_yen = 500 * i + 100 * j + 50 * k -                if total_yen - summed_yen == 0: -                    pattern_count += 1 -    print(pattern_count) +    main()