A, B, C, X = int(eval(input())), int(eval(input())), int(eval(input())), int(eval(input()))



X //= 50

answer = 0

for a in range(A + 1):

  if a * 10 > X:

    continue

  for b in range(B + 1):

    for c in range(C + 1):

      if a * 10 + b * 2 + c == X:

        answer += 1



print(answer)
A, B, C, X = int(eval(input())), int(eval(input())), int(eval(input())), int(eval(input()))



X //= 50

answer = 0

for a in range(A + 1):

  if a * 10 > X:

    continue

  for b in range(B + 1):

    if a * 10 + b * 2 > X:

      continue

    for c in range(C + 1):

      if a * 10 + b * 2 + c == X:

        answer += 1



print(answer)

A, B, C, X = (
    int(eval(input())),
    int(eval(input())),
    int(eval(input())),
    int(eval(input())),
)
X //= 50
answer = 0
for a in range(A + 1):
    if a * 10 > X:
        continue
    for b in range(B + 1):
        for c in range(C + 1):
            if a * 10 + b * 2 + c == X:
                answer += 1
print(answer)

A, B, C, X = (
    int(eval(input())),
    int(eval(input())),
    int(eval(input())),
    int(eval(input())),
)
X //= 50
answer = 0
for a in range(A + 1):
    if a * 10 > X:
        continue
    for b in range(B + 1):
        if a * 10 + b * 2 > X:
            continue
        for c in range(C + 1):
            if a * 10 + b * 2 + c == X:
                answer += 1
print(answer)

+        if a * 10 + b * 2 > X: +            continue