def solve(string):

    a, b, c, x = list(map(int, string.split()))

    ans = 0

    for i in range(a + 1):

        for j in range(b + 1):

            for k in range(c + 1):

                if 500 * i + 100 * j + 50 * k == x:

                    ans += 1

    return str(ans)





if __name__ == '__main__':

    n = 4

    print((solve('\n'.join([eval(input()) for _ in range(n)]))))

def solve(string):

    a, b, c, x = list(map(int, string.split()))

    ans = 0

    for i in range(a + 1):

        for j in range(b + 1):

            if 0 <= x - 500 * i - 100 * j <= 50 * c:

                ans += 1

    return str(ans)





if __name__ == '__main__':

    n = 4

    print((solve('\n'.join([eval(input()) for _ in range(n)]))))

def solve(string):
    a, b, c, x = list(map(int, string.split()))
    ans = 0
    for i in range(a + 1):
        for j in range(b + 1):
            for k in range(c + 1):
                if 500 * i + 100 * j + 50 * k == x:
                    ans += 1
    return str(ans)


if __name__ == "__main__":
    n = 4
    print((solve("\n".join([eval(input()) for _ in range(n)]))))

def solve(string):
    a, b, c, x = list(map(int, string.split()))
    ans = 0
    for i in range(a + 1):
        for j in range(b + 1):
            if 0 <= x - 500 * i - 100 * j <= 50 * c:
                ans += 1
    return str(ans)


if __name__ == "__main__":
    n = 4
    print((solve("\n".join([eval(input()) for _ in range(n)]))))

-            for k in range(c + 1): -                if 500 * i + 100 * j + 50 * k == x: -                    ans += 1 +            if 0 <= x - 500 * i - 100 * j <= 50 * c: +                ans += 1