def main():

    A = int(input().strip())

    B = int(input().strip())

    C = int(input().strip())

    X = int(input().strip())

    

    if 500 > X: A = 0

    if 100 > X: B = 0

    count = 0

    for ai in [x*500 for x in range(A+1)]:

        Xa = X - ai

        for bi in [x*100 for x in range(B+1)]:

            Xb = Xa - bi

            for ci in [x*50 for x in range(C+1)]:

                Xc = Xb - ci

                if Xc == 0:

                    count += 1

    return count

if __name__ == '__main__':

    print((main()))
def main():

    A = int(input().strip())

    B = int(input().strip())

    C = int(input().strip())

    X = int(input().strip())

    

    count = 0

    for ai in [x*500 for x in range(A+1)]:

        Xa = X - ai

        if Xa < 0: break

        for bi in [x*100 for x in range(B+1)]:

            Xb = Xa - bi

            if Xb < 0: break

            for ci in [x*50 for x in range(C+1)]:

                Xc = Xb - ci

                if Xc < 0: break



                if Xc == 0:

                    count += 1

    return count

if __name__ == '__main__':

    print((main()))
def main():
    A = int(input().strip())
    B = int(input().strip())
    C = int(input().strip())
    X = int(input().strip())
    if 500 > X:
        A = 0
    if 100 > X:
        B = 0
    count = 0
    for ai in [x * 500 for x in range(A + 1)]:
        Xa = X - ai
        for bi in [x * 100 for x in range(B + 1)]:
            Xb = Xa - bi
            for ci in [x * 50 for x in range(C + 1)]:
                Xc = Xb - ci
                if Xc == 0:
                    count += 1
    return count


if __name__ == "__main__":
    print((main()))

def main():
    A = int(input().strip())
    B = int(input().strip())
    C = int(input().strip())
    X = int(input().strip())
    count = 0
    for ai in [x * 500 for x in range(A + 1)]:
        Xa = X - ai
        if Xa < 0:
            break
        for bi in [x * 100 for x in range(B + 1)]:
            Xb = Xa - bi
            if Xb < 0:
                break
            for ci in [x * 50 for x in range(C + 1)]:
                Xc = Xb - ci
                if Xc < 0:
                    break
                if Xc == 0:
                    count += 1
    return count


if __name__ == "__main__":
    print((main()))

-    if 500 > X: -        A = 0 -    if 100 > X: -        B = 0 +        if Xa < 0: +            break +            if Xb < 0: +                break +                if Xc < 0: +                    break