
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		//String str = sc.nextLine();
		//String sl[] = str.split(" ");
		int a = Integer.parseInt(sc.nextLine());
		int b = Integer.parseInt(sc.nextLine());
		int c = Integer.parseInt(sc.nextLine());
		int x = Integer.parseInt(sc.nextLine());

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

		//String str = sc.nextLine();
		//String sl[] = str.split(" ");
		int a = Integer.parseInt(sc.nextLine());
		int b = Integer.parseInt(sc.nextLine());
		int c = Integer.parseInt(sc.nextLine());
		int x = Integer.parseInt(sc.nextLine());

		int s = 0;
		
		for(int i = 0; i <= a; i++)
			for(int j = 0; j <= b; j++)
				for(int k = 0; k <= c; k++)
					s += (500 * i + 100 * j + 50 * k == x ? 1 : 0);
		System.out.println(s);
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		//String str = sc.nextLine();
		//String sl[] = str.split(" ");
		int a = Integer.parseInt(sc.nextLine());
		int b = Integer.parseInt(sc.nextLine());
		int c = Integer.parseInt(sc.nextLine());
		int x = Integer.parseInt(sc.nextLine());

		int s = 0;
		
		for(int i = 0; i <= a; i++)
			for(int j = 0; j <= b; j++)
				for(int k = 0; k <= c; k++)
					s += (500 * i + 100 * j + 50 * k == x ? 1 : 0);
		System.out.println(s);
	} main {
		Scanner sc = new Scanner(System.in);

		//String str = sc.nextLine();
		//String sl[] = str.split(" ");
		int a = Integer.parseInt(sc.nextLine());
		int b = Integer.parseInt(sc.nextLine());
		int c = Integer.parseInt(sc.nextLine());
		int x = Integer.parseInt(sc.nextLine());

		int s = 0;
		
		for(int i = 0; i <= a; i++)
			for(int j = 0; j <= b; j++)
				for(int k = 0; k <= c; k++)
					s += (500 * i + 100 * j + 50 * k == x ? 1 : 0);
		System.out.println(s);
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int a = Integer.parseInt(sc.nextLine()); a Integer.parseInt(sc.nextLine()) Integer.parseInt Integer sc.nextLine() sc.nextLine sc int b = Integer.parseInt(sc.nextLine()); b Integer.parseInt(sc.nextLine()) Integer.parseInt Integer sc.nextLine() sc.nextLine sc int c = Integer.parseInt(sc.nextLine()); c Integer.parseInt(sc.nextLine()) Integer.parseInt Integer sc.nextLine() sc.nextLine sc int x = Integer.parseInt(sc.nextLine()); x Integer.parseInt(sc.nextLine()) Integer.parseInt Integer sc.nextLine() sc.nextLine sc int s = 0; s 0 for(int i = 0; i <= a; i++)
			for(int j = 0; j <= b; j++)
				for(int k = 0; k <= c; k++)
					s += (500 * i + 100 * j + 50 * k == x ? 1 : 0); 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++)
					s += (500 * i + 100 * j + 50 * k == x ? 1 : 0); for(int j = 0; j <= b; j++)
				for(int k = 0; k <= c; k++)
					s += (500 * i + 100 * j + 50 * k == x ? 1 : 0); int j = 0; int j = 0; j 0 j <= b j b j++ j++ j for(int k = 0; k <= c; k++)
					s += (500 * i + 100 * j + 50 * k == x ? 1 : 0); for(int k = 0; k <= c; k++)
					s += (500 * i + 100 * j + 50 * k == x ? 1 : 0); int k = 0; int k = 0; k 0 k <= c k c k++ k++ k s += (500 * i + 100 * j + 50 * k == x ? 1 : 0); s += (500 * i + 100 * j + 50 * k == x ? 1 : 0) s (500 * i + 100 * j + 50 * k == x ? 1 : 0) 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 1 0 System.out.println(s) System.out.println System.out System System.out s String[] args args public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		//String str = sc.nextLine();
		//String sl[] = str.split(" ");
		int a = Integer.parseInt(sc.nextLine());
		int b = Integer.parseInt(sc.nextLine());
		int c = Integer.parseInt(sc.nextLine());
		int x = Integer.parseInt(sc.nextLine());

		int s = 0;
		
		for(int i = 0; i <= a; i++)
			for(int j = 0; j <= b; j++)
				for(int k = 0; k <= c; k++)
					s += (500 * i + 100 * j + 50 * k == x ? 1 : 0);
		System.out.println(s);
	}
} public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		//String str = sc.nextLine();
		//String sl[] = str.split(" ");
		int a = Integer.parseInt(sc.nextLine());
		int b = Integer.parseInt(sc.nextLine());
		int c = Integer.parseInt(sc.nextLine());
		int x = Integer.parseInt(sc.nextLine());

		int s = 0;
		
		for(int i = 0; i <= a; i++)
			for(int j = 0; j <= b; j++)
				for(int k = 0; k <= c; k++)
					s += (500 * i + 100 * j + 50 * k == x ? 1 : 0);
		System.out.println(s);
	}
} Main

import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		//String str = sc.nextLine();
		//String sl[] = str.split(" ");
		int a = Integer.parseInt(sc.nextLine());
		int b = Integer.parseInt(sc.nextLine());
		int c = Integer.parseInt(sc.nextLine());
		int x = Integer.parseInt(sc.nextLine());

		int s = 0;
		
		for(int i = 0; i <= a; i++)
			for(int j = 0; j <= b; j++)
				for(int k = 0; k <= c; k++)
					s += (500 * i + 100 * j + 50 * k == x ? 1 : 0);
		System.out.println(s);
	}
}