import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int m500 = sc.nextInt();
        int m100 = sc.nextInt();
        int m50 = sc.nextInt();
      	int sum = sc.nextInt();
      	sc.close();
      	int count = 0;
      	for (int a=0; a<=m500; a++) {
        	for (int b=0; b<=m100; b++) {
              for (int c=0; c<=m50; c++) {
                if (500*a+100*b+50*c==sum) {
                  count++;
                }
              }
            }
        }
      	System.out.println(count);
	}
} import java.util.*; util.* java public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int m500 = sc.nextInt();
        int m100 = sc.nextInt();
        int m50 = sc.nextInt();
      	int sum = sc.nextInt();
      	sc.close();
      	int count = 0;
      	for (int a=0; a<=m500; a++) {
        	for (int b=0; b<=m100; b++) {
              for (int c=0; c<=m50; c++) {
                if (500*a+100*b+50*c==sum) {
                  count++;
                }
              }
            }
        }
      	System.out.println(count);
	}
} Main public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int m500 = sc.nextInt();
        int m100 = sc.nextInt();
        int m50 = sc.nextInt();
      	int sum = sc.nextInt();
      	sc.close();
      	int count = 0;
      	for (int a=0; a<=m500; a++) {
        	for (int b=0; b<=m100; b++) {
              for (int c=0; c<=m50; c++) {
                if (500*a+100*b+50*c==sum) {
                  count++;
                }
              }
            }
        }
      	System.out.println(count);
	} main {
		Scanner sc = new Scanner(System.in);
		int m500 = sc.nextInt();
        int m100 = sc.nextInt();
        int m50 = sc.nextInt();
      	int sum = sc.nextInt();
      	sc.close();
      	int count = 0;
      	for (int a=0; a<=m500; a++) {
        	for (int b=0; b<=m100; b++) {
              for (int c=0; c<=m50; c++) {
                if (500*a+100*b+50*c==sum) {
                  count++;
                }
              }
            }
        }
      	System.out.println(count);
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int m500 = sc.nextInt(); m500 sc.nextInt() sc.nextInt sc int m100 = sc.nextInt(); m100 sc.nextInt() sc.nextInt sc int m50 = sc.nextInt(); m50 sc.nextInt() sc.nextInt sc int sum = sc.nextInt(); sum sc.nextInt() sc.nextInt sc sc.close() sc.close sc int count = 0; count 0 for (int a=0; a<=m500; a++) {
        	for (int b=0; b<=m100; b++) {
              for (int c=0; c<=m50; c++) {
                if (500*a+100*b+50*c==sum) {
                  count++;
                }
              }
            }
        } int a=0; int a=0; a 0 a<=m500 a m500 a++ a++ a {
        	for (int b=0; b<=m100; b++) {
              for (int c=0; c<=m50; c++) {
                if (500*a+100*b+50*c==sum) {
                  count++;
                }
              }
            }
        } {
        	for (int b=0; b<=m100; b++) {
              for (int c=0; c<=m50; c++) {
                if (500*a+100*b+50*c==sum) {
                  count++;
                }
              }
            }
        } for (int b=0; b<=m100; b++) {
              for (int c=0; c<=m50; c++) {
                if (500*a+100*b+50*c==sum) {
                  count++;
                }
              }
            } int b=0; int b=0; b 0 b<=m100 b m100 b++ b++ b {
              for (int c=0; c<=m50; c++) {
                if (500*a+100*b+50*c==sum) {
                  count++;
                }
              }
            } {
              for (int c=0; c<=m50; c++) {
                if (500*a+100*b+50*c==sum) {
                  count++;
                }
              }
            } for (int c=0; c<=m50; c++) {
                if (500*a+100*b+50*c==sum) {
                  count++;
                }
              } int c=0; int c=0; c 0 c<=m50 c m50 c++ c++ c {
                if (500*a+100*b+50*c==sum) {
                  count++;
                }
              } {
                if (500*a+100*b+50*c==sum) {
                  count++;
                }
              } if (500*a+100*b+50*c==sum) {
                  count++;
                } 500*a+100*b+50*c==sum 500*a+100*b+50*c 500*a+100*b+50*c 500*a 500 a 100*b 100 b 50*c 50 c sum {
                  count++;
                } count++ count System.out.println(count) System.out.println System.out System System.out count String[] args args public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int m500 = sc.nextInt();
        int m100 = sc.nextInt();
        int m50 = sc.nextInt();
      	int sum = sc.nextInt();
      	sc.close();
      	int count = 0;
      	for (int a=0; a<=m500; a++) {
        	for (int b=0; b<=m100; b++) {
              for (int c=0; c<=m50; c++) {
                if (500*a+100*b+50*c==sum) {
                  count++;
                }
              }
            }
        }
      	System.out.println(count);
	}
} public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int m500 = sc.nextInt();
        int m100 = sc.nextInt();
        int m50 = sc.nextInt();
      	int sum = sc.nextInt();
      	sc.close();
      	int count = 0;
      	for (int a=0; a<=m500; a++) {
        	for (int b=0; b<=m100; b++) {
              for (int c=0; c<=m50; c++) {
                if (500*a+100*b+50*c==sum) {
                  count++;
                }
              }
            }
        }
      	System.out.println(count);
	}
} Main
import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int m500 = sc.nextInt();
        int m100 = sc.nextInt();
        int m50 = sc.nextInt();
      	int sum = sc.nextInt();
      	sc.close();
      	int count = 0;
      	for (int a=0; a<=m500; a++) {
        	for (int b=0; b<=m100; b++) {
              for (int c=0; c<=m50; c++) {
                if (500*a+100*b+50*c==sum) {
                  count++;
                }
              }
            }
        }
      	System.out.println(count);
	}
}