'use strict';
function main(input) {
    var args = input.split('\n').map((n) => parseInt(n, 10));
  	let cnt = 0
    for (var i = 0; i <= args[0]; i++) {
      for (var j = 0; j <= args[1]; j++) {
        for (var k = 0; k <= args[2]; k++) {
            const t = i * 500 + j * 100 + k * 50
            if (t === args[3]) cnt = cnt + 1
        }
      }
    }
  	console.log(cnt)
}

main(require('fs').readFileSync('/dev/stdin', 'utf8'));