def main():

    A = int(eval(input()))

    B = int(eval(input()))

    C = int(eval(input()))

    X = int(eval(input()))

    

    ans = 0



    for i in range(A+1):

        for j in range(B+1):

            for h in range(C+1):

                if 500*i + 100*j + 50*h == X:

                    ans += 1    

    print(ans)



if __name__ == "__main__":

    main()
def main():

    A = int(eval(input()))

    B = int(eval(input()))

    C = int(eval(input()))

    X = int(eval(input()))

    

    ans = 0



    for i in range(A+1):

        for j in range(B+1):

            tmp = X - 500*i - 100*j

            if tmp >= 0 and tmp//50 <= C:

                ans += 1 

    print(ans)



if __name__ == "__main__":

    main()
def main():
    A = int(eval(input()))
    B = int(eval(input()))
    C = int(eval(input()))
    X = int(eval(input()))
    ans = 0
    for i in range(A + 1):
        for j in range(B + 1):
            for h in range(C + 1):
                if 500 * i + 100 * j + 50 * h == X:
                    ans += 1
    print(ans)


if __name__ == "__main__":
    main()

def main():
    A = int(eval(input()))
    B = int(eval(input()))
    C = int(eval(input()))
    X = int(eval(input()))
    ans = 0
    for i in range(A + 1):
        for j in range(B + 1):
            tmp = X - 500 * i - 100 * j
            if tmp >= 0 and tmp // 50 <= C:
                ans += 1
    print(ans)


if __name__ == "__main__":
    main()

-            for h in range(C + 1): -                if 500 * i + 100 * j + 50 * h == X: -                    ans += 1 +            tmp = X - 500 * i - 100 * j +            if tmp >= 0 and tmp // 50 <= C: +                ans += 1