a = int(eval(input()))

b = int(eval(input()))

c = int(eval(input()))

x = int(eval(input()))

count = 0



def multiple(l,m,n):

    ans = 500*l + 100*m + 50*n

    return ans

o = 0

p = 0

q = 0



while o <= a:

    while p <= b:

        while q <= c:

            ans_x = multiple(o,p,q)

            if x == ans_x:

                count += 1

            q += 1

        q = 0

        p += 1

    q = 0

    p = 0

    o += 1



print(count)
# -*- coding: utf-8 -*-

# 整数の入力



A = int(eval(input()))

B = int(eval(input()))

C = int(eval(input()))

X = int(eval(input()))



i = 0

j = 0

k = 0

cnt = 0

sum = 0

while i <= A:

    j = 0

    if i>50:

        break

    while j <= B:

        k = 0

        if j>50:

            break

        while k <= C:

            if k>50:

                break

            else:

                sum = 500*i + 100*j + 50*k

                if X == sum:

                    cnt += 1

                k += 1

                sum = 0

        j += 1

    i += 1



print(cnt)
a = int(eval(input()))
b = int(eval(input()))
c = int(eval(input()))
x = int(eval(input()))
count = 0


def multiple(l, m, n):
    ans = 500 * l + 100 * m + 50 * n
    return ans


o = 0
p = 0
q = 0
while o <= a:
    while p <= b:
        while q <= c:
            ans_x = multiple(o, p, q)
            if x == ans_x:
                count += 1
            q += 1
        q = 0
        p += 1
    q = 0
    p = 0
    o += 1
print(count)

# -*- coding: utf-8 -*-
# 整数の入力
A = int(eval(input()))
B = int(eval(input()))
C = int(eval(input()))
X = int(eval(input()))
i = 0
j = 0
k = 0
cnt = 0
sum = 0
while i <= A:
    j = 0
    if i > 50:
        break
    while j <= B:
        k = 0
        if j > 50:
            break
        while k <= C:
            if k > 50:
                break
            else:
                sum = 500 * i + 100 * j + 50 * k
                if X == sum:
                    cnt += 1
                k += 1
                sum = 0
        j += 1
    i += 1
print(cnt)

-a = int(eval(input())) -b = int(eval(input())) -c = int(eval(input())) -x = int(eval(input())) -count = 0 - - -def multiple(l, m, n): -    ans = 500 * l + 100 * m + 50 * n -    return ans - - -o = 0 -p = 0 -q = 0 -while o <= a: -    while p <= b: -        while q <= c: -            ans_x = multiple(o, p, q) -            if x == ans_x: -                count += 1 -            q += 1 -        q = 0 -        p += 1 -    q = 0 -    p = 0 -    o += 1 -print(count) +# -*- coding: utf-8 -*- +# 整数の入力 +A = int(eval(input())) +B = int(eval(input())) +C = int(eval(input())) +X = int(eval(input())) +i = 0 +j = 0 +k = 0 +cnt = 0 +sum = 0 +while i <= A: +    j = 0 +    if i > 50: +        break +    while j <= B: +        k = 0 +        if j > 50: +            break +        while k <= C: +            if k > 50: +                break +            else: +                sum = 500 * i + 100 * j + 50 * k +                if X == sum: +                    cnt += 1 +                k += 1 +                sum = 0 +        j += 1 +    i += 1 +print(cnt)