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