function Main(input){
  	var coins = input.split("\n");
	
  	var a_s = 500;
  	var b_s = 100;
  	var c_s = 50; 	
  	var a = 0;
  	var b = 0;
  	var c = 0;
  	var count = 0;
  
  	c += 1;
  	inf_loop:
  	while(1)
    { 
    c += 1;
  	if(c>coins[2]){
    	c = 0; // cの数をリセット
    	b += 1;
    	if(b>coins[1]){
        	b = 0; // bの数をリセット
        	a += 1;
            if(a>coins[0]){
               break inf_loop;
            }else{
              if(a*a_s+b*b_s+c*c_s == coins[3]){
                count += 1;
              }
            }
        }else{
              if(a*a_s+b*b_s+c*c_s == coins[3]){
              	count += 1;
              }
        }
    }else{
    	if(a*a_s+b*b_s+c*c_s == coins[3]){
        count += 1;
        }
    }
    }
    console.log(count);

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