
import java.util.Scanner;
public class Main {
	public static void main(String[] args) {
		//宣言文
		//標準入力オブジェクトを生成
		Scanner sc = new Scanner(System.in);
		//標準入力で以下の変数を初期化
		int numberA = sc.nextInt();
		int numberB = sc.nextInt();
		int numberC = sc.nextInt();
		int numberX = sc.nextInt();
		//和変数
		int sumNum = 0;
		//フラグ変数
		int flagNum = 0;

		//処理文
		for(int i = 0; i <= numberA; i++) {
			for(int j = 0; j <= numberB; j++) {
				for(int k = 0; k <= numberC; k++) {
					sumNum = ((500 * i) + (100 * j) + (50 * k));
					if(numberX == sumNum) {
						flagNum++;
					}
				}
			}
		}
			//標準出力
			System.out.print(flagNum);
	}
} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) {
		//宣言文
		//標準入力オブジェクトを生成
		Scanner sc = new Scanner(System.in);
		//標準入力で以下の変数を初期化
		int numberA = sc.nextInt();
		int numberB = sc.nextInt();
		int numberC = sc.nextInt();
		int numberX = sc.nextInt();
		//和変数
		int sumNum = 0;
		//フラグ変数
		int flagNum = 0;

		//処理文
		for(int i = 0; i <= numberA; i++) {
			for(int j = 0; j <= numberB; j++) {
				for(int k = 0; k <= numberC; k++) {
					sumNum = ((500 * i) + (100 * j) + (50 * k));
					if(numberX == sumNum) {
						flagNum++;
					}
				}
			}
		}
			//標準出力
			System.out.print(flagNum);
	}
} Main public static void main(String[] args) {
		//宣言文
		//標準入力オブジェクトを生成
		Scanner sc = new Scanner(System.in);
		//標準入力で以下の変数を初期化
		int numberA = sc.nextInt();
		int numberB = sc.nextInt();
		int numberC = sc.nextInt();
		int numberX = sc.nextInt();
		//和変数
		int sumNum = 0;
		//フラグ変数
		int flagNum = 0;

		//処理文
		for(int i = 0; i <= numberA; i++) {
			for(int j = 0; j <= numberB; j++) {
				for(int k = 0; k <= numberC; k++) {
					sumNum = ((500 * i) + (100 * j) + (50 * k));
					if(numberX == sumNum) {
						flagNum++;
					}
				}
			}
		}
			//標準出力
			System.out.print(flagNum);
	} main {
		//宣言文
		//標準入力オブジェクトを生成
		Scanner sc = new Scanner(System.in);
		//標準入力で以下の変数を初期化
		int numberA = sc.nextInt();
		int numberB = sc.nextInt();
		int numberC = sc.nextInt();
		int numberX = sc.nextInt();
		//和変数
		int sumNum = 0;
		//フラグ変数
		int flagNum = 0;

		//処理文
		for(int i = 0; i <= numberA; i++) {
			for(int j = 0; j <= numberB; j++) {
				for(int k = 0; k <= numberC; k++) {
					sumNum = ((500 * i) + (100 * j) + (50 * k));
					if(numberX == sumNum) {
						flagNum++;
					}
				}
			}
		}
			//標準出力
			System.out.print(flagNum);
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int numberA = sc.nextInt(); numberA sc.nextInt() sc.nextInt sc int numberB = sc.nextInt(); numberB sc.nextInt() sc.nextInt sc int numberC = sc.nextInt(); numberC sc.nextInt() sc.nextInt sc int numberX = sc.nextInt(); numberX sc.nextInt() sc.nextInt sc int sumNum = 0; sumNum 0 int flagNum = 0; flagNum 0 for(int i = 0; i <= numberA; i++) {
			for(int j = 0; j <= numberB; j++) {
				for(int k = 0; k <= numberC; k++) {
					sumNum = ((500 * i) + (100 * j) + (50 * k));
					if(numberX == sumNum) {
						flagNum++;
					}
				}
			}
		} int i = 0; int i = 0; i 0 i <= numberA i numberA i++ i++ i {
			for(int j = 0; j <= numberB; j++) {
				for(int k = 0; k <= numberC; k++) {
					sumNum = ((500 * i) + (100 * j) + (50 * k));
					if(numberX == sumNum) {
						flagNum++;
					}
				}
			}
		} {
			for(int j = 0; j <= numberB; j++) {
				for(int k = 0; k <= numberC; k++) {
					sumNum = ((500 * i) + (100 * j) + (50 * k));
					if(numberX == sumNum) {
						flagNum++;
					}
				}
			}
		} for(int j = 0; j <= numberB; j++) {
				for(int k = 0; k <= numberC; k++) {
					sumNum = ((500 * i) + (100 * j) + (50 * k));
					if(numberX == sumNum) {
						flagNum++;
					}
				}
			} int j = 0; int j = 0; j 0 j <= numberB j numberB j++ j++ j {
				for(int k = 0; k <= numberC; k++) {
					sumNum = ((500 * i) + (100 * j) + (50 * k));
					if(numberX == sumNum) {
						flagNum++;
					}
				}
			} {
				for(int k = 0; k <= numberC; k++) {
					sumNum = ((500 * i) + (100 * j) + (50 * k));
					if(numberX == sumNum) {
						flagNum++;
					}
				}
			} for(int k = 0; k <= numberC; k++) {
					sumNum = ((500 * i) + (100 * j) + (50 * k));
					if(numberX == sumNum) {
						flagNum++;
					}
				} int k = 0; int k = 0; k 0 k <= numberC k numberC k++ k++ k {
					sumNum = ((500 * i) + (100 * j) + (50 * k));
					if(numberX == sumNum) {
						flagNum++;
					}
				} {
					sumNum = ((500 * i) + (100 * j) + (50 * k));
					if(numberX == sumNum) {
						flagNum++;
					}
				} sumNum = ((500 * i) + (100 * j) + (50 * k)) sumNum ((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(numberX == sumNum) {
						flagNum++;
					} numberX == sumNum numberX sumNum {
						flagNum++;
					} flagNum++ flagNum System.out.print(flagNum) System.out.print System.out System System.out flagNum String[] args args public class Main {
	public static void main(String[] args) {
		//宣言文
		//標準入力オブジェクトを生成
		Scanner sc = new Scanner(System.in);
		//標準入力で以下の変数を初期化
		int numberA = sc.nextInt();
		int numberB = sc.nextInt();
		int numberC = sc.nextInt();
		int numberX = sc.nextInt();
		//和変数
		int sumNum = 0;
		//フラグ変数
		int flagNum = 0;

		//処理文
		for(int i = 0; i <= numberA; i++) {
			for(int j = 0; j <= numberB; j++) {
				for(int k = 0; k <= numberC; k++) {
					sumNum = ((500 * i) + (100 * j) + (50 * k));
					if(numberX == sumNum) {
						flagNum++;
					}
				}
			}
		}
			//標準出力
			System.out.print(flagNum);
	}
} public class Main {
	public static void main(String[] args) {
		//宣言文
		//標準入力オブジェクトを生成
		Scanner sc = new Scanner(System.in);
		//標準入力で以下の変数を初期化
		int numberA = sc.nextInt();
		int numberB = sc.nextInt();
		int numberC = sc.nextInt();
		int numberX = sc.nextInt();
		//和変数
		int sumNum = 0;
		//フラグ変数
		int flagNum = 0;

		//処理文
		for(int i = 0; i <= numberA; i++) {
			for(int j = 0; j <= numberB; j++) {
				for(int k = 0; k <= numberC; k++) {
					sumNum = ((500 * i) + (100 * j) + (50 * k));
					if(numberX == sumNum) {
						flagNum++;
					}
				}
			}
		}
			//標準出力
			System.out.print(flagNum);
	}
} Main

import java.util.Scanner;
public class Main {
	public static void main(String[] args) {
		//宣言文
		//標準入力オブジェクトを生成
		Scanner sc = new Scanner(System.in);
		//標準入力で以下の変数を初期化
		int numberA = sc.nextInt();
		int numberB = sc.nextInt();
		int numberC = sc.nextInt();
		int numberX = sc.nextInt();
		//和変数
		int sumNum = 0;
		//フラグ変数
		int flagNum = 0;

		//処理文
		for(int i = 0; i <= numberA; i++) {
			for(int j = 0; j <= numberB; j++) {
				for(int k = 0; k <= numberC; k++) {
					sumNum = ((500 * i) + (100 * j) + (50 * k));
					if(numberX == sumNum) {
						flagNum++;
					}
				}
			}
		}
			//標準出力
			System.out.print(flagNum);
	}
}
