function Main(input) {
    a = input.split("\n")[0];
    b = input.split("\n")[1];
    c = input.split("\n")[2];
    x = input.split("\n")[3];

    var count = 0;
    
    for (var i = 0; i <= a; i++) {
        for (var j = 0; j <= b; j++) {
            for (var k = 0; k <= c; k++) {
                if (500 * i + 100 * j + 50 * k == x ) {
                    count++;
                }
            }
        }
    } 

    console.log(count)
  
    }
  Main(require("fs").readFileSync("/dev/stdin", "utf8"));
  