def resolve():

    A,B,C,X = [int(eval(input())) for i in range(4)]



    res = 0

    for a in range(A+1):

        for b in range(B+1):

            for c in range(C+1):

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

                if total == X:

                    res += 1



    print(res)

    

resolve()
def resolve():

    A,B,C,X = [int(eval(input())) for i in range(4)]



    res = 0

    mA = min(X//500, A)

    for i in range(mA+1):

        Y = X - 500 * i

        mB = min(Y//100, B)

        for j in range(mB+1):

            Z = Y - 100 * j

            if Z <= 50*C:

                res += 1



    print(res)

    

resolve()
def resolve():
    A, B, C, X = [int(eval(input())) for i in range(4)]
    res = 0
    for a in range(A + 1):
        for b in range(B + 1):
            for c in range(C + 1):
                total = 500 * a + 100 * b + 50 * c
                if total == X:
                    res += 1
    print(res)


resolve()

def resolve():
    A, B, C, X = [int(eval(input())) for i in range(4)]
    res = 0
    mA = min(X // 500, A)
    for i in range(mA + 1):
        Y = X - 500 * i
        mB = min(Y // 100, B)
        for j in range(mB + 1):
            Z = Y - 100 * j
            if Z <= 50 * C:
                res += 1
    print(res)


resolve()

-    for a in range(A + 1): -        for b in range(B + 1): -            for c in range(C + 1): -                total = 500 * a + 100 * b + 50 * c -                if total == X: -                    res += 1 +    mA = min(X // 500, A) +    for i in range(mA + 1): +        Y = X - 500 * i +        mB = min(Y // 100, B) +        for j in range(mB + 1): +            Z = Y - 100 * j +            if Z <= 50 * C: +                res += 1