import java.util.Scanner;

class Main{
	public static void main(String[] args) {
		Scanner stdIn=new Scanner(System.in);
		int a=stdIn.nextInt(),b=stdIn.nextInt(),c=stdIn.nextInt(),x=stdIn.nextInt(),s=0,i,j,k;
		for(i=0;i<=a;i++) for(j=0;j<=b;j++) for(k=0;k<=c;k++) if(500*i+100*j+50*k==x) s++;
		System.out.print(s);
	}
} import java.util.Scanner; Scanner java.util class Main{
	public static void main(String[] args) {
		Scanner stdIn=new Scanner(System.in);
		int a=stdIn.nextInt(),b=stdIn.nextInt(),c=stdIn.nextInt(),x=stdIn.nextInt(),s=0,i,j,k;
		for(i=0;i<=a;i++) for(j=0;j<=b;j++) for(k=0;k<=c;k++) if(500*i+100*j+50*k==x) s++;
		System.out.print(s);
	}
} Main public static void main(String[] args) {
		Scanner stdIn=new Scanner(System.in);
		int a=stdIn.nextInt(),b=stdIn.nextInt(),c=stdIn.nextInt(),x=stdIn.nextInt(),s=0,i,j,k;
		for(i=0;i<=a;i++) for(j=0;j<=b;j++) for(k=0;k<=c;k++) if(500*i+100*j+50*k==x) s++;
		System.out.print(s);
	} main {
		Scanner stdIn=new Scanner(System.in);
		int a=stdIn.nextInt(),b=stdIn.nextInt(),c=stdIn.nextInt(),x=stdIn.nextInt(),s=0,i,j,k;
		for(i=0;i<=a;i++) for(j=0;j<=b;j++) for(k=0;k<=c;k++) if(500*i+100*j+50*k==x) s++;
		System.out.print(s);
	} Scanner stdIn=new Scanner(System.in); stdIn new Scanner(System.in) int a=stdIn.nextInt() a stdIn.nextInt() stdIn.nextInt stdIn b=stdIn.nextInt() b stdIn.nextInt() stdIn.nextInt stdIn c=stdIn.nextInt() c stdIn.nextInt() stdIn.nextInt stdIn x=stdIn.nextInt() x stdIn.nextInt() stdIn.nextInt stdIn s=0 s 0 i i j j k; k for(i=0;i<=a;i++) for(j=0;j<=b;j++) for(k=0;k<=c;k++) if(500*i+100*j+50*k==x) s++; i=0; i=0 i 0 i<=a i a i++ i++ i for(j=0;j<=b;j++) for(k=0;k<=c;k++) if(500*i+100*j+50*k==x) s++; for(j=0;j<=b;j++) for(k=0;k<=c;k++) if(500*i+100*j+50*k==x) s++; j=0; j=0 j 0 j<=b j b j++ j++ j for(k=0;k<=c;k++) if(500*i+100*j+50*k==x) s++; for(k=0;k<=c;k++) if(500*i+100*j+50*k==x) s++; k=0; k=0 k 0 k<=c k c k++ k++ k if(500*i+100*j+50*k==x) s++; if(500*i+100*j+50*k==x) s++; 500*i+100*j+50*k==x 500*i+100*j+50*k 500*i+100*j+50*k 500*i 500 i 100*j 100 j 50*k 50 k x s++ s System.out.print(s) System.out.print System.out System System.out s String[] args args
import java.util.Scanner;

class Main{
	public static void main(String[] args) {
		Scanner stdIn=new Scanner(System.in);
		int a=stdIn.nextInt(),b=stdIn.nextInt(),c=stdIn.nextInt(),x=stdIn.nextInt(),s=0,i,j,k;
		for(i=0;i<=a;i++) for(j=0;j<=b;j++) for(k=0;k<=c;k++) if(500*i+100*j+50*k==x) s++;
		System.out.print(s);
	}
}