def main():

    a = int(eval(input())) # 500

    b = int(eval(input())) # 100

    c = int(eval(input())) #  50

    x = int(eval(input()))



    ans = 0



    for i in range(a+1):

        I = i*500

        for j in range(b+1):

            J = j*100

            for k in range(c+1):

                K = k*50

                if I+J+K == x:

                    ans +=1



    print(ans)



if __name__ == '__main__':

    main()

def main():

    a = int(eval(input())) # 500

    b = int(eval(input())) # 100

    c = int(eval(input())) #  50

    x = int(eval(input()))



    ans = 0



    for i in range(a+1):

        I = i*500

        if I > x:

            break

        for j in range(b+1):

            J = j*100

            if I+J > x:

                break

            for k in range(c+1):

                K = k*50

                if I+J+K == x:

                    ans +=1



    print(ans)



if __name__ == '__main__':

    main()

def main():
    a = int(eval(input()))  # 500
    b = int(eval(input()))  # 100
    c = int(eval(input()))  #  50
    x = int(eval(input()))
    ans = 0
    for i in range(a + 1):
        I = i * 500
        for j in range(b + 1):
            J = j * 100
            for k in range(c + 1):
                K = k * 50
                if I + J + K == x:
                    ans += 1
    print(ans)


if __name__ == "__main__":
    main()

def main():
    a = int(eval(input()))  # 500
    b = int(eval(input()))  # 100
    c = int(eval(input()))  #  50
    x = int(eval(input()))
    ans = 0
    for i in range(a + 1):
        I = i * 500
        if I > x:
            break
        for j in range(b + 1):
            J = j * 100
            if I + J > x:
                break
            for k in range(c + 1):
                K = k * 50
                if I + J + K == x:
                    ans += 1
    print(ans)


if __name__ == "__main__":
    main()

+        if I > x: +            break +            if I + J > x: +                break