import java.util.Scanner;

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

        for(int i = 0; i < 3; i++) {
            arr[i] = sc.nextInt();
        }
        int X = sc.nextInt();
        int res = 0;

        for(int i = 0; i <= arr[0]; i++) {
            for(int j = 0; j <= arr[1]; j++) {
                for(int k = 0; k <= arr[2]; k++) {
                    int total = 500*i + 100*j + 50*k;
                    if(total == X) {
                        res++;
                    }
                }
            }
        }
        System.out.println(res);
    }
} import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int[] arr = new int[3];

        for(int i = 0; i < 3; i++) {
            arr[i] = sc.nextInt();
        }
        int X = sc.nextInt();
        int res = 0;

        for(int i = 0; i <= arr[0]; i++) {
            for(int j = 0; j <= arr[1]; j++) {
                for(int k = 0; k <= arr[2]; k++) {
                    int total = 500*i + 100*j + 50*k;
                    if(total == X) {
                        res++;
                    }
                }
            }
        }
        System.out.println(res);
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int[] arr = new int[3];

        for(int i = 0; i < 3; i++) {
            arr[i] = sc.nextInt();
        }
        int X = sc.nextInt();
        int res = 0;

        for(int i = 0; i <= arr[0]; i++) {
            for(int j = 0; j <= arr[1]; j++) {
                for(int k = 0; k <= arr[2]; k++) {
                    int total = 500*i + 100*j + 50*k;
                    if(total == X) {
                        res++;
                    }
                }
            }
        }
        System.out.println(res);
    } main {
        Scanner sc = new Scanner(System.in);
        int[] arr = new int[3];

        for(int i = 0; i < 3; i++) {
            arr[i] = sc.nextInt();
        }
        int X = sc.nextInt();
        int res = 0;

        for(int i = 0; i <= arr[0]; i++) {
            for(int j = 0; j <= arr[1]; j++) {
                for(int k = 0; k <= arr[2]; k++) {
                    int total = 500*i + 100*j + 50*k;
                    if(total == X) {
                        res++;
                    }
                }
            }
        }
        System.out.println(res);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int[] arr = new int[3]; arr new int[3] 3 for(int i = 0; i < 3; i++) {
            arr[i] = sc.nextInt();
        } int i = 0; int i = 0; i 0 i < 3 i 3 i++ i++ i {
            arr[i] = sc.nextInt();
        } {
            arr[i] = sc.nextInt();
        } arr[i] = sc.nextInt() arr[i] arr i sc.nextInt() sc.nextInt sc int X = sc.nextInt(); X sc.nextInt() sc.nextInt sc int res = 0; res 0 for(int i = 0; i <= arr[0]; i++) {
            for(int j = 0; j <= arr[1]; j++) {
                for(int k = 0; k <= arr[2]; k++) {
                    int total = 500*i + 100*j + 50*k;
                    if(total == X) {
                        res++;
                    }
                }
            }
        } int i = 0; int i = 0; i 0 i <= arr[0] i arr[0] arr 0 i++ i++ i {
            for(int j = 0; j <= arr[1]; j++) {
                for(int k = 0; k <= arr[2]; k++) {
                    int total = 500*i + 100*j + 50*k;
                    if(total == X) {
                        res++;
                    }
                }
            }
        } {
            for(int j = 0; j <= arr[1]; j++) {
                for(int k = 0; k <= arr[2]; k++) {
                    int total = 500*i + 100*j + 50*k;
                    if(total == X) {
                        res++;
                    }
                }
            }
        } for(int j = 0; j <= arr[1]; j++) {
                for(int k = 0; k <= arr[2]; k++) {
                    int total = 500*i + 100*j + 50*k;
                    if(total == X) {
                        res++;
                    }
                }
            } int j = 0; int j = 0; j 0 j <= arr[1] j arr[1] arr 1 j++ j++ j {
                for(int k = 0; k <= arr[2]; k++) {
                    int total = 500*i + 100*j + 50*k;
                    if(total == X) {
                        res++;
                    }
                }
            } {
                for(int k = 0; k <= arr[2]; k++) {
                    int total = 500*i + 100*j + 50*k;
                    if(total == X) {
                        res++;
                    }
                }
            } for(int k = 0; k <= arr[2]; k++) {
                    int total = 500*i + 100*j + 50*k;
                    if(total == X) {
                        res++;
                    }
                } int k = 0; int k = 0; k 0 k <= arr[2] k arr[2] arr 2 k++ k++ k {
                    int total = 500*i + 100*j + 50*k;
                    if(total == X) {
                        res++;
                    }
                } {
                    int total = 500*i + 100*j + 50*k;
                    if(total == X) {
                        res++;
                    }
                } int total = 500*i + 100*j + 50*k; total 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(total == X) {
                        res++;
                    } total == X total X {
                        res++;
                    } res++ res System.out.println(res) System.out.println System.out System System.out res String[] args args public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int[] arr = new int[3];

        for(int i = 0; i < 3; i++) {
            arr[i] = sc.nextInt();
        }
        int X = sc.nextInt();
        int res = 0;

        for(int i = 0; i <= arr[0]; i++) {
            for(int j = 0; j <= arr[1]; j++) {
                for(int k = 0; k <= arr[2]; k++) {
                    int total = 500*i + 100*j + 50*k;
                    if(total == X) {
                        res++;
                    }
                }
            }
        }
        System.out.println(res);
    }
} public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int[] arr = new int[3];

        for(int i = 0; i < 3; i++) {
            arr[i] = sc.nextInt();
        }
        int X = sc.nextInt();
        int res = 0;

        for(int i = 0; i <= arr[0]; i++) {
            for(int j = 0; j <= arr[1]; j++) {
                for(int k = 0; k <= arr[2]; k++) {
                    int total = 500*i + 100*j + 50*k;
                    if(total == X) {
                        res++;
                    }
                }
            }
        }
        System.out.println(res);
    }
} Main
import java.util.Scanner;

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

        for(int i = 0; i < 3; i++) {
            arr[i] = sc.nextInt();
        }
        int X = sc.nextInt();
        int res = 0;

        for(int i = 0; i <= arr[0]; i++) {
            for(int j = 0; j <= arr[1]; j++) {
                for(int k = 0; k <= arr[2]; k++) {
                    int total = 500*i + 100*j + 50*k;
                    if(total == X) {
                        res++;
                    }
                }
            }
        }
        System.out.println(res);
    }
}
