import java.util.*;

public class Main {
    public static void main(String args[]) {
        Scanner sc = new Scanner(System.in);
        int a500 = sc.nextInt();
        int b100 = sc.nextInt();
        int c50 = sc.nextInt();
        int sum = sc.nextInt();

        int count = 0;
        for (int i = 0; i <= a500; i++) {
            for (int j = 0; j <= b100; j++) {
                int r = (sum - 500 * i - 100 * j) / 50;
                if (r >= 0 && r <= c50) {
                    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 a500 = sc.nextInt();
        int b100 = sc.nextInt();
        int c50 = sc.nextInt();
        int sum = sc.nextInt();

        int count = 0;
        for (int i = 0; i <= a500; i++) {
            for (int j = 0; j <= b100; j++) {
                int r = (sum - 500 * i - 100 * j) / 50;
                if (r >= 0 && r <= c50) {
                    count++;
                };
            }
        }
        System.out.println(count);
    }
} Main public static void main(String args[]) {
        Scanner sc = new Scanner(System.in);
        int a500 = sc.nextInt();
        int b100 = sc.nextInt();
        int c50 = sc.nextInt();
        int sum = sc.nextInt();

        int count = 0;
        for (int i = 0; i <= a500; i++) {
            for (int j = 0; j <= b100; j++) {
                int r = (sum - 500 * i - 100 * j) / 50;
                if (r >= 0 && r <= c50) {
                    count++;
                };
            }
        }
        System.out.println(count);
    } main {
        Scanner sc = new Scanner(System.in);
        int a500 = sc.nextInt();
        int b100 = sc.nextInt();
        int c50 = sc.nextInt();
        int sum = sc.nextInt();

        int count = 0;
        for (int i = 0; i <= a500; i++) {
            for (int j = 0; j <= b100; j++) {
                int r = (sum - 500 * i - 100 * j) / 50;
                if (r >= 0 && r <= c50) {
                    count++;
                };
            }
        }
        System.out.println(count);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int a500 = sc.nextInt(); a500 sc.nextInt() sc.nextInt sc int b100 = sc.nextInt(); b100 sc.nextInt() sc.nextInt sc int c50 = sc.nextInt(); c50 sc.nextInt() sc.nextInt sc int sum = sc.nextInt(); sum sc.nextInt() sc.nextInt sc int count = 0; count 0 for (int i = 0; i <= a500; i++) {
            for (int j = 0; j <= b100; j++) {
                int r = (sum - 500 * i - 100 * j) / 50;
                if (r >= 0 && r <= c50) {
                    count++;
                };
            }
        } int i = 0; int i = 0; i 0 i <= a500 i a500 i++ i++ i {
            for (int j = 0; j <= b100; j++) {
                int r = (sum - 500 * i - 100 * j) / 50;
                if (r >= 0 && r <= c50) {
                    count++;
                };
            }
        } {
            for (int j = 0; j <= b100; j++) {
                int r = (sum - 500 * i - 100 * j) / 50;
                if (r >= 0 && r <= c50) {
                    count++;
                };
            }
        } for (int j = 0; j <= b100; j++) {
                int r = (sum - 500 * i - 100 * j) / 50;
                if (r >= 0 && r <= c50) {
                    count++;
                };
            } int j = 0; int j = 0; j 0 j <= b100 j b100 j++ j++ j {
                int r = (sum - 500 * i - 100 * j) / 50;
                if (r >= 0 && r <= c50) {
                    count++;
                };
            } {
                int r = (sum - 500 * i - 100 * j) / 50;
                if (r >= 0 && r <= c50) {
                    count++;
                };
            } int r = (sum - 500 * i - 100 * j) / 50; r (sum - 500 * i - 100 * j) / 50 (sum - 500 * i - 100 * j) sum - 500 * i - 100 * j sum 500 * i 500 i 100 * j 100 j 50 if (r >= 0 && r <= c50) {
                    count++;
                } r >= 0 && r <= c50 r >= 0 r 0 r <= c50 r c50 {
                    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 a500 = sc.nextInt();
        int b100 = sc.nextInt();
        int c50 = sc.nextInt();
        int sum = sc.nextInt();

        int count = 0;
        for (int i = 0; i <= a500; i++) {
            for (int j = 0; j <= b100; j++) {
                int r = (sum - 500 * i - 100 * j) / 50;
                if (r >= 0 && r <= c50) {
                    count++;
                };
            }
        }
        System.out.println(count);
    }
} public class Main {
    public static void main(String args[]) {
        Scanner sc = new Scanner(System.in);
        int a500 = sc.nextInt();
        int b100 = sc.nextInt();
        int c50 = sc.nextInt();
        int sum = sc.nextInt();

        int count = 0;
        for (int i = 0; i <= a500; i++) {
            for (int j = 0; j <= b100; j++) {
                int r = (sum - 500 * i - 100 * j) / 50;
                if (r >= 0 && r <= c50) {
                    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 a500 = sc.nextInt();
        int b100 = sc.nextInt();
        int c50 = sc.nextInt();
        int sum = sc.nextInt();

        int count = 0;
        for (int i = 0; i <= a500; i++) {
            for (int j = 0; j <= b100; j++) {
                int r = (sum - 500 * i - 100 * j) / 50;
                if (r >= 0 && r <= c50) {
                    count++;
                };
            }
        }
        System.out.println(count);
    }
}