import java.util.*;
public class Main
{
	public static void main(String[] args)
	{
		Scanner sc = new Scanner(System.in);
		int A = sc.nextInt();
		int B = sc.nextInt();
		int C = sc.nextInt();
		int X = sc.nextInt();
		//call answer Method argument 4
		System.out.println(answer(A,B,C,X));

	}

	//need method
	//
	private static int answer(int A,int B,int C,int X)
	{
		int countHowToChoose = 0;
		for(int a = 0;a <= A;a++){
			for(int b = 0;b <= B;b++){
				for(int c = 0;c <= C;c++){
					int xyenQuestion = 500*a+100*b+50*c;
					//System.out.println(xyenQuestion);
					if(xyenQuestion == X){	
					countHowToChoose++;	
					}
				}
			}
		}
		return countHowToChoose;
	}
}
 import java.util.*; util.* java public class Main
{
	public static void main(String[] args)
	{
		Scanner sc = new Scanner(System.in);
		int A = sc.nextInt();
		int B = sc.nextInt();
		int C = sc.nextInt();
		int X = sc.nextInt();
		//call answer Method argument 4
		System.out.println(answer(A,B,C,X));

	}

	//need method
	//
	private static int answer(int A,int B,int C,int X)
	{
		int countHowToChoose = 0;
		for(int a = 0;a <= A;a++){
			for(int b = 0;b <= B;b++){
				for(int c = 0;c <= C;c++){
					int xyenQuestion = 500*a+100*b+50*c;
					//System.out.println(xyenQuestion);
					if(xyenQuestion == X){	
					countHowToChoose++;	
					}
				}
			}
		}
		return countHowToChoose;
	}
} Main public static void main(String[] args)
	{
		Scanner sc = new Scanner(System.in);
		int A = sc.nextInt();
		int B = sc.nextInt();
		int C = sc.nextInt();
		int X = sc.nextInt();
		//call answer Method argument 4
		System.out.println(answer(A,B,C,X));

	} main {
		Scanner sc = new Scanner(System.in);
		int A = sc.nextInt();
		int B = sc.nextInt();
		int C = sc.nextInt();
		int X = sc.nextInt();
		//call answer Method argument 4
		System.out.println(answer(A,B,C,X));

	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int A = sc.nextInt(); A sc.nextInt() sc.nextInt sc int B = sc.nextInt(); B sc.nextInt() sc.nextInt sc int C = sc.nextInt(); C sc.nextInt() sc.nextInt sc int X = sc.nextInt(); X sc.nextInt() sc.nextInt sc System.out.println(answer(A,B,C,X)) System.out.println System.out System System.out answer(A,B,C,X) answer A B C X String[] args args //need method
	//
	private static int answer(int A,int B,int C,int X)
	{
		int countHowToChoose = 0;
		for(int a = 0;a <= A;a++){
			for(int b = 0;b <= B;b++){
				for(int c = 0;c <= C;c++){
					int xyenQuestion = 500*a+100*b+50*c;
					//System.out.println(xyenQuestion);
					if(xyenQuestion == X){	
					countHowToChoose++;	
					}
				}
			}
		}
		return countHowToChoose;
	} answer {
		int countHowToChoose = 0;
		for(int a = 0;a <= A;a++){
			for(int b = 0;b <= B;b++){
				for(int c = 0;c <= C;c++){
					int xyenQuestion = 500*a+100*b+50*c;
					//System.out.println(xyenQuestion);
					if(xyenQuestion == X){	
					countHowToChoose++;	
					}
				}
			}
		}
		return countHowToChoose;
	} int countHowToChoose = 0; countHowToChoose 0 for(int a = 0;a <= A;a++){
			for(int b = 0;b <= B;b++){
				for(int c = 0;c <= C;c++){
					int xyenQuestion = 500*a+100*b+50*c;
					//System.out.println(xyenQuestion);
					if(xyenQuestion == X){	
					countHowToChoose++;	
					}
				}
			}
		} int a = 0; int a = 0; a 0 a <= A a A a++ a++ a {
			for(int b = 0;b <= B;b++){
				for(int c = 0;c <= C;c++){
					int xyenQuestion = 500*a+100*b+50*c;
					//System.out.println(xyenQuestion);
					if(xyenQuestion == X){	
					countHowToChoose++;	
					}
				}
			}
		} {
			for(int b = 0;b <= B;b++){
				for(int c = 0;c <= C;c++){
					int xyenQuestion = 500*a+100*b+50*c;
					//System.out.println(xyenQuestion);
					if(xyenQuestion == X){	
					countHowToChoose++;	
					}
				}
			}
		} for(int b = 0;b <= B;b++){
				for(int c = 0;c <= C;c++){
					int xyenQuestion = 500*a+100*b+50*c;
					//System.out.println(xyenQuestion);
					if(xyenQuestion == X){	
					countHowToChoose++;	
					}
				}
			} int b = 0; int b = 0; b 0 b <= B b B b++ b++ b {
				for(int c = 0;c <= C;c++){
					int xyenQuestion = 500*a+100*b+50*c;
					//System.out.println(xyenQuestion);
					if(xyenQuestion == X){	
					countHowToChoose++;	
					}
				}
			} {
				for(int c = 0;c <= C;c++){
					int xyenQuestion = 500*a+100*b+50*c;
					//System.out.println(xyenQuestion);
					if(xyenQuestion == X){	
					countHowToChoose++;	
					}
				}
			} for(int c = 0;c <= C;c++){
					int xyenQuestion = 500*a+100*b+50*c;
					//System.out.println(xyenQuestion);
					if(xyenQuestion == X){	
					countHowToChoose++;	
					}
				} int c = 0; int c = 0; c 0 c <= C c C c++ c++ c {
					int xyenQuestion = 500*a+100*b+50*c;
					//System.out.println(xyenQuestion);
					if(xyenQuestion == X){	
					countHowToChoose++;	
					}
				} {
					int xyenQuestion = 500*a+100*b+50*c;
					//System.out.println(xyenQuestion);
					if(xyenQuestion == X){	
					countHowToChoose++;	
					}
				} int xyenQuestion = 500*a+100*b+50*c; xyenQuestion 500*a+100*b+50*c 500*a+100*b+50*c 500*a 500 a 100*b 100 b 50*c 50 c if(xyenQuestion == X){	
					countHowToChoose++;	
					} xyenQuestion == X xyenQuestion X {	
					countHowToChoose++;	
					} countHowToChoose++ countHowToChoose return countHowToChoose; countHowToChoose int A A int B B int C C int X X public class Main
{
	public static void main(String[] args)
	{
		Scanner sc = new Scanner(System.in);
		int A = sc.nextInt();
		int B = sc.nextInt();
		int C = sc.nextInt();
		int X = sc.nextInt();
		//call answer Method argument 4
		System.out.println(answer(A,B,C,X));

	}

	//need method
	//
	private static int answer(int A,int B,int C,int X)
	{
		int countHowToChoose = 0;
		for(int a = 0;a <= A;a++){
			for(int b = 0;b <= B;b++){
				for(int c = 0;c <= C;c++){
					int xyenQuestion = 500*a+100*b+50*c;
					//System.out.println(xyenQuestion);
					if(xyenQuestion == X){	
					countHowToChoose++;	
					}
				}
			}
		}
		return countHowToChoose;
	}
} public class Main
{
	public static void main(String[] args)
	{
		Scanner sc = new Scanner(System.in);
		int A = sc.nextInt();
		int B = sc.nextInt();
		int C = sc.nextInt();
		int X = sc.nextInt();
		//call answer Method argument 4
		System.out.println(answer(A,B,C,X));

	}

	//need method
	//
	private static int answer(int A,int B,int C,int X)
	{
		int countHowToChoose = 0;
		for(int a = 0;a <= A;a++){
			for(int b = 0;b <= B;b++){
				for(int c = 0;c <= C;c++){
					int xyenQuestion = 500*a+100*b+50*c;
					//System.out.println(xyenQuestion);
					if(xyenQuestion == X){	
					countHowToChoose++;	
					}
				}
			}
		}
		return countHowToChoose;
	}
} Main
import java.util.*;
public class Main
{
	public static void main(String[] args)
	{
		Scanner sc = new Scanner(System.in);
		int A = sc.nextInt();
		int B = sc.nextInt();
		int C = sc.nextInt();
		int X = sc.nextInt();
		//call answer Method argument 4
		System.out.println(answer(A,B,C,X));

	}

	//need method
	//
	private static int answer(int A,int B,int C,int X)
	{
		int countHowToChoose = 0;
		for(int a = 0;a <= A;a++){
			for(int b = 0;b <= B;b++){
				for(int c = 0;c <= C;c++){
					int xyenQuestion = 500*a+100*b+50*c;
					//System.out.println(xyenQuestion);
					if(xyenQuestion == X){	
					countHowToChoose++;	
					}
				}
			}
		}
		return countHowToChoose;
	}
}

