function main(input) {
    const args = input.split('\n');
    const A = parseInt(args[0], 10),
          B = parseInt(args[1], 10),
          C = parseInt(args[2], 10),
          X = parseInt(args[3], 10);

    var count = 0;

    for (let i = 0; i < A; i++) {
    	for (let j = 0; j < B; j++) {
        	for (let k = 0; k < C; k++) {
            	X === (500*i + 100*j + 10*k) ? count++ : '';
            }
        }
    }
    console.log(count);
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));
