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)

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()

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)

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()

-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) +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()