import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();
        int c = sc.nextInt();
        int x = sc.nextInt();

        int answer = 0;

        for (int gohyaku=0; gohyaku <= a; gohyaku++){
            if(gohyaku * 500 == x){
                answer++;
                break;
            }else if (gohyaku * 500 > x){
                break;
            }

            for(int hyaku=0; hyaku <= b; hyaku++){
                if (gohyaku * 500 + hyaku * 100 == x){
                    answer++;
                    break;
                }
                else if (gohyaku * 500 + hyaku * 100 > x){
                    break;
                }

                for (int gozyu = 0; gozyu <= c; gozyu++){
                    // 合計値比較
                    if (gohyaku * 500 + hyaku * 100 + gozyu * 50 == x){
                        answer++;
                        break;
                    }
                }
            }
        }

        System.out.println(answer);


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

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();
        int c = sc.nextInt();
        int x = sc.nextInt();

        int answer = 0;

        for (int gohyaku=0; gohyaku <= a; gohyaku++){
            if(gohyaku * 500 == x){
                answer++;
                break;
            }else if (gohyaku * 500 > x){
                break;
            }

            for(int hyaku=0; hyaku <= b; hyaku++){
                if (gohyaku * 500 + hyaku * 100 == x){
                    answer++;
                    break;
                }
                else if (gohyaku * 500 + hyaku * 100 > x){
                    break;
                }

                for (int gozyu = 0; gozyu <= c; gozyu++){
                    // 合計値比較
                    if (gohyaku * 500 + hyaku * 100 + gozyu * 50 == x){
                        answer++;
                        break;
                    }
                }
            }
        }

        System.out.println(answer);


    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();
        int c = sc.nextInt();
        int x = sc.nextInt();

        int answer = 0;

        for (int gohyaku=0; gohyaku <= a; gohyaku++){
            if(gohyaku * 500 == x){
                answer++;
                break;
            }else if (gohyaku * 500 > x){
                break;
            }

            for(int hyaku=0; hyaku <= b; hyaku++){
                if (gohyaku * 500 + hyaku * 100 == x){
                    answer++;
                    break;
                }
                else if (gohyaku * 500 + hyaku * 100 > x){
                    break;
                }

                for (int gozyu = 0; gozyu <= c; gozyu++){
                    // 合計値比較
                    if (gohyaku * 500 + hyaku * 100 + gozyu * 50 == x){
                        answer++;
                        break;
                    }
                }
            }
        }

        System.out.println(answer);


    } main {
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();
        int c = sc.nextInt();
        int x = sc.nextInt();

        int answer = 0;

        for (int gohyaku=0; gohyaku <= a; gohyaku++){
            if(gohyaku * 500 == x){
                answer++;
                break;
            }else if (gohyaku * 500 > x){
                break;
            }

            for(int hyaku=0; hyaku <= b; hyaku++){
                if (gohyaku * 500 + hyaku * 100 == x){
                    answer++;
                    break;
                }
                else if (gohyaku * 500 + hyaku * 100 > x){
                    break;
                }

                for (int gozyu = 0; gozyu <= c; gozyu++){
                    // 合計値比較
                    if (gohyaku * 500 + hyaku * 100 + gozyu * 50 == x){
                        answer++;
                        break;
                    }
                }
            }
        }

        System.out.println(answer);


    } 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 answer = 0; answer 0 for (int gohyaku=0; gohyaku <= a; gohyaku++){
            if(gohyaku * 500 == x){
                answer++;
                break;
            }else if (gohyaku * 500 > x){
                break;
            }

            for(int hyaku=0; hyaku <= b; hyaku++){
                if (gohyaku * 500 + hyaku * 100 == x){
                    answer++;
                    break;
                }
                else if (gohyaku * 500 + hyaku * 100 > x){
                    break;
                }

                for (int gozyu = 0; gozyu <= c; gozyu++){
                    // 合計値比較
                    if (gohyaku * 500 + hyaku * 100 + gozyu * 50 == x){
                        answer++;
                        break;
                    }
                }
            }
        } int gohyaku=0; int gohyaku=0; gohyaku 0 gohyaku <= a gohyaku a gohyaku++ gohyaku++ gohyaku {
            if(gohyaku * 500 == x){
                answer++;
                break;
            }else if (gohyaku * 500 > x){
                break;
            }

            for(int hyaku=0; hyaku <= b; hyaku++){
                if (gohyaku * 500 + hyaku * 100 == x){
                    answer++;
                    break;
                }
                else if (gohyaku * 500 + hyaku * 100 > x){
                    break;
                }

                for (int gozyu = 0; gozyu <= c; gozyu++){
                    // 合計値比較
                    if (gohyaku * 500 + hyaku * 100 + gozyu * 50 == x){
                        answer++;
                        break;
                    }
                }
            }
        } {
            if(gohyaku * 500 == x){
                answer++;
                break;
            }else if (gohyaku * 500 > x){
                break;
            }

            for(int hyaku=0; hyaku <= b; hyaku++){
                if (gohyaku * 500 + hyaku * 100 == x){
                    answer++;
                    break;
                }
                else if (gohyaku * 500 + hyaku * 100 > x){
                    break;
                }

                for (int gozyu = 0; gozyu <= c; gozyu++){
                    // 合計値比較
                    if (gohyaku * 500 + hyaku * 100 + gozyu * 50 == x){
                        answer++;
                        break;
                    }
                }
            }
        } if(gohyaku * 500 == x){
                answer++;
                break;
            }else if (gohyaku * 500 > x){
                break;
            } gohyaku * 500 == x gohyaku * 500 gohyaku 500 x {
                answer++;
                break;
            } answer++ answer break; if (gohyaku * 500 > x){
                break;
            } gohyaku * 500 > x gohyaku * 500 gohyaku 500 x {
                break;
            } break; for(int hyaku=0; hyaku <= b; hyaku++){
                if (gohyaku * 500 + hyaku * 100 == x){
                    answer++;
                    break;
                }
                else if (gohyaku * 500 + hyaku * 100 > x){
                    break;
                }

                for (int gozyu = 0; gozyu <= c; gozyu++){
                    // 合計値比較
                    if (gohyaku * 500 + hyaku * 100 + gozyu * 50 == x){
                        answer++;
                        break;
                    }
                }
            } int hyaku=0; int hyaku=0; hyaku 0 hyaku <= b hyaku b hyaku++ hyaku++ hyaku {
                if (gohyaku * 500 + hyaku * 100 == x){
                    answer++;
                    break;
                }
                else if (gohyaku * 500 + hyaku * 100 > x){
                    break;
                }

                for (int gozyu = 0; gozyu <= c; gozyu++){
                    // 合計値比較
                    if (gohyaku * 500 + hyaku * 100 + gozyu * 50 == x){
                        answer++;
                        break;
                    }
                }
            } {
                if (gohyaku * 500 + hyaku * 100 == x){
                    answer++;
                    break;
                }
                else if (gohyaku * 500 + hyaku * 100 > x){
                    break;
                }

                for (int gozyu = 0; gozyu <= c; gozyu++){
                    // 合計値比較
                    if (gohyaku * 500 + hyaku * 100 + gozyu * 50 == x){
                        answer++;
                        break;
                    }
                }
            } if (gohyaku * 500 + hyaku * 100 == x){
                    answer++;
                    break;
                }
                else if (gohyaku * 500 + hyaku * 100 > x){
                    break;
                } gohyaku * 500 + hyaku * 100 == x gohyaku * 500 + hyaku * 100 gohyaku * 500 gohyaku 500 hyaku * 100 hyaku 100 x {
                    answer++;
                    break;
                } answer++ answer break; if (gohyaku * 500 + hyaku * 100 > x){
                    break;
                } gohyaku * 500 + hyaku * 100 > x gohyaku * 500 + hyaku * 100 gohyaku * 500 gohyaku 500 hyaku * 100 hyaku 100 x {
                    break;
                } break; for (int gozyu = 0; gozyu <= c; gozyu++){
                    // 合計値比較
                    if (gohyaku * 500 + hyaku * 100 + gozyu * 50 == x){
                        answer++;
                        break;
                    }
                } int gozyu = 0; int gozyu = 0; gozyu 0 gozyu <= c gozyu c gozyu++ gozyu++ gozyu {
                    // 合計値比較
                    if (gohyaku * 500 + hyaku * 100 + gozyu * 50 == x){
                        answer++;
                        break;
                    }
                } {
                    // 合計値比較
                    if (gohyaku * 500 + hyaku * 100 + gozyu * 50 == x){
                        answer++;
                        break;
                    }
                } if (gohyaku * 500 + hyaku * 100 + gozyu * 50 == x){
                        answer++;
                        break;
                    } gohyaku * 500 + hyaku * 100 + gozyu * 50 == x gohyaku * 500 + hyaku * 100 + gozyu * 50 gohyaku * 500 + hyaku * 100 + gozyu * 50 gohyaku * 500 gohyaku 500 hyaku * 100 hyaku 100 gozyu * 50 gozyu 50 x {
                        answer++;
                        break;
                    } answer++ answer break; System.out.println(answer) System.out.println System.out System System.out answer String[] args args public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();
        int c = sc.nextInt();
        int x = sc.nextInt();

        int answer = 0;

        for (int gohyaku=0; gohyaku <= a; gohyaku++){
            if(gohyaku * 500 == x){
                answer++;
                break;
            }else if (gohyaku * 500 > x){
                break;
            }

            for(int hyaku=0; hyaku <= b; hyaku++){
                if (gohyaku * 500 + hyaku * 100 == x){
                    answer++;
                    break;
                }
                else if (gohyaku * 500 + hyaku * 100 > x){
                    break;
                }

                for (int gozyu = 0; gozyu <= c; gozyu++){
                    // 合計値比較
                    if (gohyaku * 500 + hyaku * 100 + gozyu * 50 == x){
                        answer++;
                        break;
                    }
                }
            }
        }

        System.out.println(answer);


    }
} public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();
        int c = sc.nextInt();
        int x = sc.nextInt();

        int answer = 0;

        for (int gohyaku=0; gohyaku <= a; gohyaku++){
            if(gohyaku * 500 == x){
                answer++;
                break;
            }else if (gohyaku * 500 > x){
                break;
            }

            for(int hyaku=0; hyaku <= b; hyaku++){
                if (gohyaku * 500 + hyaku * 100 == x){
                    answer++;
                    break;
                }
                else if (gohyaku * 500 + hyaku * 100 > x){
                    break;
                }

                for (int gozyu = 0; gozyu <= c; gozyu++){
                    // 合計値比較
                    if (gohyaku * 500 + hyaku * 100 + gozyu * 50 == x){
                        answer++;
                        break;
                    }
                }
            }
        }

        System.out.println(answer);


    }
} Main
import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();
        int c = sc.nextInt();
        int x = sc.nextInt();

        int answer = 0;

        for (int gohyaku=0; gohyaku <= a; gohyaku++){
            if(gohyaku * 500 == x){
                answer++;
                break;
            }else if (gohyaku * 500 > x){
                break;
            }

            for(int hyaku=0; hyaku <= b; hyaku++){
                if (gohyaku * 500 + hyaku * 100 == x){
                    answer++;
                    break;
                }
                else if (gohyaku * 500 + hyaku * 100 > x){
                    break;
                }

                for (int gozyu = 0; gozyu <= c; gozyu++){
                    // 合計値比較
                    if (gohyaku * 500 + hyaku * 100 + gozyu * 50 == x){
                        answer++;
                        break;
                    }
                }
            }
        }

        System.out.println(answer);


    }
}
