import java.util.*;
import static java.lang.Math.*;

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

		// 入力
		int a = sc.nextInt();// 500円玉の枚数
		int b = sc.nextInt();// 100円玉の枚数
		int c = sc.nextInt();// 50円玉の枚数
		int x = sc.nextInt();// 目標金額(50の倍数)

		// 操作が可能な限り実行する。
		int Num = NumberOfPatterns(a, b, c, x/50);

		// 出力
		System.out.println(Num);
	}

	// パターン数を再帰的に計算
	static int NumberOfPatterns(int a, int b, int c, int unit){
		
		int n = 0;

		if(unit == 0){
			return 1;
		}
		if(a >= 1 && unit >= 10){
			n = n + NumberOfPatterns(a - 1, b, c, unit - 10);
			n = n + NumberOfPatterns(0, b, c, unit);
		}else if(b >= 1 && unit >= 2){
			n = n + NumberOfPatterns(0, b - 1, c, unit - 2);
			n = n + NumberOfPatterns(0, 0, c, unit);
		}else if(c >= unit){
			n = n + NumberOfPatterns(0, 0, c - 1, unit - 1);
			n = n + NumberOfPatterns(0, 0, 0, unit);
		}
		return n;
	}
}

 import java.util.*; util.* java import static java.lang.Math.*; import static java.lang.Math.*; import static java.lang.Math.*; public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);

		// 入力
		int a = sc.nextInt();// 500円玉の枚数
		int b = sc.nextInt();// 100円玉の枚数
		int c = sc.nextInt();// 50円玉の枚数
		int x = sc.nextInt();// 目標金額(50の倍数)

		// 操作が可能な限り実行する。
		int Num = NumberOfPatterns(a, b, c, x/50);

		// 出力
		System.out.println(Num);
	}

	// パターン数を再帰的に計算
	static int NumberOfPatterns(int a, int b, int c, int unit){
		
		int n = 0;

		if(unit == 0){
			return 1;
		}
		if(a >= 1 && unit >= 10){
			n = n + NumberOfPatterns(a - 1, b, c, unit - 10);
			n = n + NumberOfPatterns(0, b, c, unit);
		}else if(b >= 1 && unit >= 2){
			n = n + NumberOfPatterns(0, b - 1, c, unit - 2);
			n = n + NumberOfPatterns(0, 0, c, unit);
		}else if(c >= unit){
			n = n + NumberOfPatterns(0, 0, c - 1, unit - 1);
			n = n + NumberOfPatterns(0, 0, 0, unit);
		}
		return n;
	}
} Main public static void main(String[] args){
		Scanner sc = new Scanner(System.in);

		// 入力
		int a = sc.nextInt();// 500円玉の枚数
		int b = sc.nextInt();// 100円玉の枚数
		int c = sc.nextInt();// 50円玉の枚数
		int x = sc.nextInt();// 目標金額(50の倍数)

		// 操作が可能な限り実行する。
		int Num = NumberOfPatterns(a, b, c, x/50);

		// 出力
		System.out.println(Num);
	} main {
		Scanner sc = new Scanner(System.in);

		// 入力
		int a = sc.nextInt();// 500円玉の枚数
		int b = sc.nextInt();// 100円玉の枚数
		int c = sc.nextInt();// 50円玉の枚数
		int x = sc.nextInt();// 目標金額(50の倍数)

		// 操作が可能な限り実行する。
		int Num = NumberOfPatterns(a, b, c, x/50);

		// 出力
		System.out.println(Num);
	} 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 int Num = NumberOfPatterns(a, b, c, x/50); Num NumberOfPatterns(a, b, c, x/50) NumberOfPatterns a b c x/50 x 50 System.out.println(Num) System.out.println System.out System System.out Num String[] args args // パターン数を再帰的に計算
	static int NumberOfPatterns(int a, int b, int c, int unit){
		
		int n = 0;

		if(unit == 0){
			return 1;
		}
		if(a >= 1 && unit >= 10){
			n = n + NumberOfPatterns(a - 1, b, c, unit - 10);
			n = n + NumberOfPatterns(0, b, c, unit);
		}else if(b >= 1 && unit >= 2){
			n = n + NumberOfPatterns(0, b - 1, c, unit - 2);
			n = n + NumberOfPatterns(0, 0, c, unit);
		}else if(c >= unit){
			n = n + NumberOfPatterns(0, 0, c - 1, unit - 1);
			n = n + NumberOfPatterns(0, 0, 0, unit);
		}
		return n;
	} NumberOfPatterns {
		
		int n = 0;

		if(unit == 0){
			return 1;
		}
		if(a >= 1 && unit >= 10){
			n = n + NumberOfPatterns(a - 1, b, c, unit - 10);
			n = n + NumberOfPatterns(0, b, c, unit);
		}else if(b >= 1 && unit >= 2){
			n = n + NumberOfPatterns(0, b - 1, c, unit - 2);
			n = n + NumberOfPatterns(0, 0, c, unit);
		}else if(c >= unit){
			n = n + NumberOfPatterns(0, 0, c - 1, unit - 1);
			n = n + NumberOfPatterns(0, 0, 0, unit);
		}
		return n;
	} int n = 0; n 0 if(unit == 0){
			return 1;
		} unit == 0 unit 0 {
			return 1;
		} return 1; 1 if(a >= 1 && unit >= 10){
			n = n + NumberOfPatterns(a - 1, b, c, unit - 10);
			n = n + NumberOfPatterns(0, b, c, unit);
		}else if(b >= 1 && unit >= 2){
			n = n + NumberOfPatterns(0, b - 1, c, unit - 2);
			n = n + NumberOfPatterns(0, 0, c, unit);
		}else if(c >= unit){
			n = n + NumberOfPatterns(0, 0, c - 1, unit - 1);
			n = n + NumberOfPatterns(0, 0, 0, unit);
		} a >= 1 && unit >= 10 a >= 1 a 1 unit >= 10 unit 10 {
			n = n + NumberOfPatterns(a - 1, b, c, unit - 10);
			n = n + NumberOfPatterns(0, b, c, unit);
		} n = n + NumberOfPatterns(a - 1, b, c, unit - 10) n n + NumberOfPatterns(a - 1, b, c, unit - 10) n NumberOfPatterns(a - 1, b, c, unit - 10) NumberOfPatterns a - 1 a 1 b c unit - 10 unit 10 n = n + NumberOfPatterns(0, b, c, unit) n n + NumberOfPatterns(0, b, c, unit) n NumberOfPatterns(0, b, c, unit) NumberOfPatterns 0 b c unit if(b >= 1 && unit >= 2){
			n = n + NumberOfPatterns(0, b - 1, c, unit - 2);
			n = n + NumberOfPatterns(0, 0, c, unit);
		}else if(c >= unit){
			n = n + NumberOfPatterns(0, 0, c - 1, unit - 1);
			n = n + NumberOfPatterns(0, 0, 0, unit);
		} b >= 1 && unit >= 2 b >= 1 b 1 unit >= 2 unit 2 {
			n = n + NumberOfPatterns(0, b - 1, c, unit - 2);
			n = n + NumberOfPatterns(0, 0, c, unit);
		} n = n + NumberOfPatterns(0, b - 1, c, unit - 2) n n + NumberOfPatterns(0, b - 1, c, unit - 2) n NumberOfPatterns(0, b - 1, c, unit - 2) NumberOfPatterns 0 b - 1 b 1 c unit - 2 unit 2 n = n + NumberOfPatterns(0, 0, c, unit) n n + NumberOfPatterns(0, 0, c, unit) n NumberOfPatterns(0, 0, c, unit) NumberOfPatterns 0 0 c unit if(c >= unit){
			n = n + NumberOfPatterns(0, 0, c - 1, unit - 1);
			n = n + NumberOfPatterns(0, 0, 0, unit);
		} c >= unit c unit {
			n = n + NumberOfPatterns(0, 0, c - 1, unit - 1);
			n = n + NumberOfPatterns(0, 0, 0, unit);
		} n = n + NumberOfPatterns(0, 0, c - 1, unit - 1) n n + NumberOfPatterns(0, 0, c - 1, unit - 1) n NumberOfPatterns(0, 0, c - 1, unit - 1) NumberOfPatterns 0 0 c - 1 c 1 unit - 1 unit 1 n = n + NumberOfPatterns(0, 0, 0, unit) n n + NumberOfPatterns(0, 0, 0, unit) n NumberOfPatterns(0, 0, 0, unit) NumberOfPatterns 0 0 0 unit return n; n int a a int b b int c c int unit unit public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);

		// 入力
		int a = sc.nextInt();// 500円玉の枚数
		int b = sc.nextInt();// 100円玉の枚数
		int c = sc.nextInt();// 50円玉の枚数
		int x = sc.nextInt();// 目標金額(50の倍数)

		// 操作が可能な限り実行する。
		int Num = NumberOfPatterns(a, b, c, x/50);

		// 出力
		System.out.println(Num);
	}

	// パターン数を再帰的に計算
	static int NumberOfPatterns(int a, int b, int c, int unit){
		
		int n = 0;

		if(unit == 0){
			return 1;
		}
		if(a >= 1 && unit >= 10){
			n = n + NumberOfPatterns(a - 1, b, c, unit - 10);
			n = n + NumberOfPatterns(0, b, c, unit);
		}else if(b >= 1 && unit >= 2){
			n = n + NumberOfPatterns(0, b - 1, c, unit - 2);
			n = n + NumberOfPatterns(0, 0, c, unit);
		}else if(c >= unit){
			n = n + NumberOfPatterns(0, 0, c - 1, unit - 1);
			n = n + NumberOfPatterns(0, 0, 0, unit);
		}
		return n;
	}
} public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);

		// 入力
		int a = sc.nextInt();// 500円玉の枚数
		int b = sc.nextInt();// 100円玉の枚数
		int c = sc.nextInt();// 50円玉の枚数
		int x = sc.nextInt();// 目標金額(50の倍数)

		// 操作が可能な限り実行する。
		int Num = NumberOfPatterns(a, b, c, x/50);

		// 出力
		System.out.println(Num);
	}

	// パターン数を再帰的に計算
	static int NumberOfPatterns(int a, int b, int c, int unit){
		
		int n = 0;

		if(unit == 0){
			return 1;
		}
		if(a >= 1 && unit >= 10){
			n = n + NumberOfPatterns(a - 1, b, c, unit - 10);
			n = n + NumberOfPatterns(0, b, c, unit);
		}else if(b >= 1 && unit >= 2){
			n = n + NumberOfPatterns(0, b - 1, c, unit - 2);
			n = n + NumberOfPatterns(0, 0, c, unit);
		}else if(c >= unit){
			n = n + NumberOfPatterns(0, 0, c - 1, unit - 1);
			n = n + NumberOfPatterns(0, 0, 0, unit);
		}
		return n;
	}
} Main
import java.util.*;
import static java.lang.Math.*;

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

		// 入力
		int a = sc.nextInt();// 500円玉の枚数
		int b = sc.nextInt();// 100円玉の枚数
		int c = sc.nextInt();// 50円玉の枚数
		int x = sc.nextInt();// 目標金額(50の倍数)

		// 操作が可能な限り実行する。
		int Num = NumberOfPatterns(a, b, c, x/50);

		// 出力
		System.out.println(Num);
	}

	// パターン数を再帰的に計算
	static int NumberOfPatterns(int a, int b, int c, int unit){
		
		int n = 0;

		if(unit == 0){
			return 1;
		}
		if(a >= 1 && unit >= 10){
			n = n + NumberOfPatterns(a - 1, b, c, unit - 10);
			n = n + NumberOfPatterns(0, b, c, unit);
		}else if(b >= 1 && unit >= 2){
			n = n + NumberOfPatterns(0, b - 1, c, unit - 2);
			n = n + NumberOfPatterns(0, 0, c, unit);
		}else if(c >= unit){
			n = n + NumberOfPatterns(0, 0, c - 1, unit - 1);
			n = n + NumberOfPatterns(0, 0, 0, unit);
		}
		return n;
	}
}


