import java.util.Scanner;
 
public class Main {
 
    public static void main(String args[]) throws Exception {
 
        Scanner sc = new Scanner(System.in);
        int A = sc.nextInt();
        int B = sc.nextInt();
        int C = sc.nextInt();
        int X = sc.nextInt();
 
        int res = 0;
        int cnt = 0;
        for (int a = 0; a <= A; a++) {
            for (int b = 0; b <= B; b++) {
                for (int c = 0; c <= C; c++) {
                    res = 500 * a + 100 * b + 50 * c;
                    if (res == X) {
                        cnt++;
                    }
                }
            }
        }
        System.out.println(cnt);
    }
} import java.util.Scanner; Scanner java.util public class Main {
 
    public static void main(String args[]) throws Exception {
 
        Scanner sc = new Scanner(System.in);
        int A = sc.nextInt();
        int B = sc.nextInt();
        int C = sc.nextInt();
        int X = sc.nextInt();
 
        int res = 0;
        int cnt = 0;
        for (int a = 0; a <= A; a++) {
            for (int b = 0; b <= B; b++) {
                for (int c = 0; c <= C; c++) {
                    res = 500 * a + 100 * b + 50 * c;
                    if (res == X) {
                        cnt++;
                    }
                }
            }
        }
        System.out.println(cnt);
    }
} Main public static void main(String args[]) throws Exception {
 
        Scanner sc = new Scanner(System.in);
        int A = sc.nextInt();
        int B = sc.nextInt();
        int C = sc.nextInt();
        int X = sc.nextInt();
 
        int res = 0;
        int cnt = 0;
        for (int a = 0; a <= A; a++) {
            for (int b = 0; b <= B; b++) {
                for (int c = 0; c <= C; c++) {
                    res = 500 * a + 100 * b + 50 * c;
                    if (res == X) {
                        cnt++;
                    }
                }
            }
        }
        System.out.println(cnt);
    } main {
 
        Scanner sc = new Scanner(System.in);
        int A = sc.nextInt();
        int B = sc.nextInt();
        int C = sc.nextInt();
        int X = sc.nextInt();
 
        int res = 0;
        int cnt = 0;
        for (int a = 0; a <= A; a++) {
            for (int b = 0; b <= B; b++) {
                for (int c = 0; c <= C; c++) {
                    res = 500 * a + 100 * b + 50 * c;
                    if (res == X) {
                        cnt++;
                    }
                }
            }
        }
        System.out.println(cnt);
    } 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 res = 0; res 0 int cnt = 0; cnt 0 for (int a = 0; a <= A; a++) {
            for (int b = 0; b <= B; b++) {
                for (int c = 0; c <= C; c++) {
                    res = 500 * a + 100 * b + 50 * c;
                    if (res == X) {
                        cnt++;
                    }
                }
            }
        } int a = 0; int a = 0; a 0 a <= A a A a++ a++ a {
            for (int b = 0; b <= B; b++) {
                for (int c = 0; c <= C; c++) {
                    res = 500 * a + 100 * b + 50 * c;
                    if (res == X) {
                        cnt++;
                    }
                }
            }
        } {
            for (int b = 0; b <= B; b++) {
                for (int c = 0; c <= C; c++) {
                    res = 500 * a + 100 * b + 50 * c;
                    if (res == X) {
                        cnt++;
                    }
                }
            }
        } for (int b = 0; b <= B; b++) {
                for (int c = 0; c <= C; c++) {
                    res = 500 * a + 100 * b + 50 * c;
                    if (res == X) {
                        cnt++;
                    }
                }
            } int b = 0; int b = 0; b 0 b <= B b B b++ b++ b {
                for (int c = 0; c <= C; c++) {
                    res = 500 * a + 100 * b + 50 * c;
                    if (res == X) {
                        cnt++;
                    }
                }
            } {
                for (int c = 0; c <= C; c++) {
                    res = 500 * a + 100 * b + 50 * c;
                    if (res == X) {
                        cnt++;
                    }
                }
            } for (int c = 0; c <= C; c++) {
                    res = 500 * a + 100 * b + 50 * c;
                    if (res == X) {
                        cnt++;
                    }
                } int c = 0; int c = 0; c 0 c <= C c C c++ c++ c {
                    res = 500 * a + 100 * b + 50 * c;
                    if (res == X) {
                        cnt++;
                    }
                } {
                    res = 500 * a + 100 * b + 50 * c;
                    if (res == X) {
                        cnt++;
                    }
                } res = 500 * a + 100 * b + 50 * c res 500 * a + 100 * b + 50 * c 500 * a + 100 * b + 50 * c 500 * a 500 a 100 * b 100 b 50 * c 50 c if (res == X) {
                        cnt++;
                    } res == X res X {
                        cnt++;
                    } cnt++ cnt System.out.println(cnt) System.out.println System.out System System.out cnt String args[] args public class Main {
 
    public static void main(String args[]) throws Exception {
 
        Scanner sc = new Scanner(System.in);
        int A = sc.nextInt();
        int B = sc.nextInt();
        int C = sc.nextInt();
        int X = sc.nextInt();
 
        int res = 0;
        int cnt = 0;
        for (int a = 0; a <= A; a++) {
            for (int b = 0; b <= B; b++) {
                for (int c = 0; c <= C; c++) {
                    res = 500 * a + 100 * b + 50 * c;
                    if (res == X) {
                        cnt++;
                    }
                }
            }
        }
        System.out.println(cnt);
    }
} public class Main {
 
    public static void main(String args[]) throws Exception {
 
        Scanner sc = new Scanner(System.in);
        int A = sc.nextInt();
        int B = sc.nextInt();
        int C = sc.nextInt();
        int X = sc.nextInt();
 
        int res = 0;
        int cnt = 0;
        for (int a = 0; a <= A; a++) {
            for (int b = 0; b <= B; b++) {
                for (int c = 0; c <= C; c++) {
                    res = 500 * a + 100 * b + 50 * c;
                    if (res == X) {
                        cnt++;
                    }
                }
            }
        }
        System.out.println(cnt);
    }
} Main
import java.util.Scanner;
 
public class Main {
 
    public static void main(String args[]) throws Exception {
 
        Scanner sc = new Scanner(System.in);
        int A = sc.nextInt();
        int B = sc.nextInt();
        int C = sc.nextInt();
        int X = sc.nextInt();
 
        int res = 0;
        int cnt = 0;
        for (int a = 0; a <= A; a++) {
            for (int b = 0; b <= B; b++) {
                for (int c = 0; c <= C; c++) {
                    res = 500 * a + 100 * b + 50 * c;
                    if (res == X) {
                        cnt++;
                    }
                }
            }
        }
        System.out.println(cnt);
    }
}