import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		 Scanner scan = new Scanner(System.in);
		 
		 int A = Integer.parseInt(scan.nextLine());
		 int B = Integer.parseInt(scan.nextLine());
		 int C = Integer.parseInt(scan.nextLine());
		 int X = Integer.parseInt(scan.nextLine());
		 
		 int cnt = 0;
		 
		 for (int i = 0; i < A + 1; i++) {
			 for (int j = 0; j < B + 1; j++) {
				 for (int k = 0; k < C + 1; k++) {
					 if (500 * i + 100 * j + 50 * k == X) {
						 cnt++;
					 }
				 }
			 }
		 }
		 
		 System.out.println(cnt);
		 scan.close();

	}

} import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {
		 Scanner scan = new Scanner(System.in);
		 
		 int A = Integer.parseInt(scan.nextLine());
		 int B = Integer.parseInt(scan.nextLine());
		 int C = Integer.parseInt(scan.nextLine());
		 int X = Integer.parseInt(scan.nextLine());
		 
		 int cnt = 0;
		 
		 for (int i = 0; i < A + 1; i++) {
			 for (int j = 0; j < B + 1; j++) {
				 for (int k = 0; k < C + 1; k++) {
					 if (500 * i + 100 * j + 50 * k == X) {
						 cnt++;
					 }
				 }
			 }
		 }
		 
		 System.out.println(cnt);
		 scan.close();

	}

} Main public static void main(String[] args) {
		 Scanner scan = new Scanner(System.in);
		 
		 int A = Integer.parseInt(scan.nextLine());
		 int B = Integer.parseInt(scan.nextLine());
		 int C = Integer.parseInt(scan.nextLine());
		 int X = Integer.parseInt(scan.nextLine());
		 
		 int cnt = 0;
		 
		 for (int i = 0; i < A + 1; i++) {
			 for (int j = 0; j < B + 1; j++) {
				 for (int k = 0; k < C + 1; k++) {
					 if (500 * i + 100 * j + 50 * k == X) {
						 cnt++;
					 }
				 }
			 }
		 }
		 
		 System.out.println(cnt);
		 scan.close();

	} main {
		 Scanner scan = new Scanner(System.in);
		 
		 int A = Integer.parseInt(scan.nextLine());
		 int B = Integer.parseInt(scan.nextLine());
		 int C = Integer.parseInt(scan.nextLine());
		 int X = Integer.parseInt(scan.nextLine());
		 
		 int cnt = 0;
		 
		 for (int i = 0; i < A + 1; i++) {
			 for (int j = 0; j < B + 1; j++) {
				 for (int k = 0; k < C + 1; k++) {
					 if (500 * i + 100 * j + 50 * k == X) {
						 cnt++;
					 }
				 }
			 }
		 }
		 
		 System.out.println(cnt);
		 scan.close();

	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int A = Integer.parseInt(scan.nextLine()); A Integer.parseInt(scan.nextLine()) Integer.parseInt Integer scan.nextLine() scan.nextLine scan int B = Integer.parseInt(scan.nextLine()); B Integer.parseInt(scan.nextLine()) Integer.parseInt Integer scan.nextLine() scan.nextLine scan int C = Integer.parseInt(scan.nextLine()); C Integer.parseInt(scan.nextLine()) Integer.parseInt Integer scan.nextLine() scan.nextLine scan int X = Integer.parseInt(scan.nextLine()); X Integer.parseInt(scan.nextLine()) Integer.parseInt Integer scan.nextLine() scan.nextLine scan int cnt = 0; cnt 0 for (int i = 0; i < A + 1; i++) {
			 for (int j = 0; j < B + 1; j++) {
				 for (int k = 0; k < C + 1; k++) {
					 if (500 * i + 100 * j + 50 * k == X) {
						 cnt++;
					 }
				 }
			 }
		 } int i = 0; int i = 0; i 0 i < A + 1 i A + 1 A 1 i++ i++ i {
			 for (int j = 0; j < B + 1; j++) {
				 for (int k = 0; k < C + 1; k++) {
					 if (500 * i + 100 * j + 50 * k == X) {
						 cnt++;
					 }
				 }
			 }
		 } {
			 for (int j = 0; j < B + 1; j++) {
				 for (int k = 0; k < C + 1; k++) {
					 if (500 * i + 100 * j + 50 * k == X) {
						 cnt++;
					 }
				 }
			 }
		 } for (int j = 0; j < B + 1; j++) {
				 for (int k = 0; k < C + 1; k++) {
					 if (500 * i + 100 * j + 50 * k == X) {
						 cnt++;
					 }
				 }
			 } int j = 0; int j = 0; j 0 j < B + 1 j B + 1 B 1 j++ j++ j {
				 for (int k = 0; k < C + 1; k++) {
					 if (500 * i + 100 * j + 50 * k == X) {
						 cnt++;
					 }
				 }
			 } {
				 for (int k = 0; k < C + 1; k++) {
					 if (500 * i + 100 * j + 50 * k == X) {
						 cnt++;
					 }
				 }
			 } for (int k = 0; k < C + 1; k++) {
					 if (500 * i + 100 * j + 50 * k == X) {
						 cnt++;
					 }
				 } int k = 0; int k = 0; k 0 k < C + 1 k C + 1 C 1 k++ k++ k {
					 if (500 * i + 100 * j + 50 * k == X) {
						 cnt++;
					 }
				 } {
					 if (500 * i + 100 * j + 50 * k == X) {
						 cnt++;
					 }
				 } if (500 * i + 100 * j + 50 * k == X) {
						 cnt++;
					 } 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 {
						 cnt++;
					 } cnt++ cnt System.out.println(cnt) System.out.println System.out System System.out cnt scan.close() scan.close scan String[] args args public class Main {

	public static void main(String[] args) {
		 Scanner scan = new Scanner(System.in);
		 
		 int A = Integer.parseInt(scan.nextLine());
		 int B = Integer.parseInt(scan.nextLine());
		 int C = Integer.parseInt(scan.nextLine());
		 int X = Integer.parseInt(scan.nextLine());
		 
		 int cnt = 0;
		 
		 for (int i = 0; i < A + 1; i++) {
			 for (int j = 0; j < B + 1; j++) {
				 for (int k = 0; k < C + 1; k++) {
					 if (500 * i + 100 * j + 50 * k == X) {
						 cnt++;
					 }
				 }
			 }
		 }
		 
		 System.out.println(cnt);
		 scan.close();

	}

} public class Main {

	public static void main(String[] args) {
		 Scanner scan = new Scanner(System.in);
		 
		 int A = Integer.parseInt(scan.nextLine());
		 int B = Integer.parseInt(scan.nextLine());
		 int C = Integer.parseInt(scan.nextLine());
		 int X = Integer.parseInt(scan.nextLine());
		 
		 int cnt = 0;
		 
		 for (int i = 0; i < A + 1; i++) {
			 for (int j = 0; j < B + 1; j++) {
				 for (int k = 0; k < C + 1; k++) {
					 if (500 * i + 100 * j + 50 * k == X) {
						 cnt++;
					 }
				 }
			 }
		 }
		 
		 System.out.println(cnt);
		 scan.close();

	}

} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		 Scanner scan = new Scanner(System.in);
		 
		 int A = Integer.parseInt(scan.nextLine());
		 int B = Integer.parseInt(scan.nextLine());
		 int C = Integer.parseInt(scan.nextLine());
		 int X = Integer.parseInt(scan.nextLine());
		 
		 int cnt = 0;
		 
		 for (int i = 0; i < A + 1; i++) {
			 for (int j = 0; j < B + 1; j++) {
				 for (int k = 0; k < C + 1; k++) {
					 if (500 * i + 100 * j + 50 * k == X) {
						 cnt++;
					 }
				 }
			 }
		 }
		 
		 System.out.println(cnt);
		 scan.close();

	}

}
