import java.util.Scanner;

public class Main {

    public static void main(String[] args) {

        Scanner sc = new Scanner(System.in);

        int i1 = sc.nextInt();
        int i2 = sc.nextInt();
        int i3 = sc.nextInt();
        int i4 = sc.nextInt();

        int answer = 0;

        for (int i = 0; i <= i1; i++) {
            for (int j = 0; j <= i2; j++) {
                for (int k = 0; k <= i3; k++) {
                    if (i * 500 + j * 100 + k * 50 == i4) {
                        answer++;
                    }
                }
            }
        }

        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 i1 = sc.nextInt();
        int i2 = sc.nextInt();
        int i3 = sc.nextInt();
        int i4 = sc.nextInt();

        int answer = 0;

        for (int i = 0; i <= i1; i++) {
            for (int j = 0; j <= i2; j++) {
                for (int k = 0; k <= i3; k++) {
                    if (i * 500 + j * 100 + k * 50 == i4) {
                        answer++;
                    }
                }
            }
        }

        System.out.println(answer);
    }
} Main public static void main(String[] args) {

        Scanner sc = new Scanner(System.in);

        int i1 = sc.nextInt();
        int i2 = sc.nextInt();
        int i3 = sc.nextInt();
        int i4 = sc.nextInt();

        int answer = 0;

        for (int i = 0; i <= i1; i++) {
            for (int j = 0; j <= i2; j++) {
                for (int k = 0; k <= i3; k++) {
                    if (i * 500 + j * 100 + k * 50 == i4) {
                        answer++;
                    }
                }
            }
        }

        System.out.println(answer);
    } main {

        Scanner sc = new Scanner(System.in);

        int i1 = sc.nextInt();
        int i2 = sc.nextInt();
        int i3 = sc.nextInt();
        int i4 = sc.nextInt();

        int answer = 0;

        for (int i = 0; i <= i1; i++) {
            for (int j = 0; j <= i2; j++) {
                for (int k = 0; k <= i3; k++) {
                    if (i * 500 + j * 100 + k * 50 == i4) {
                        answer++;
                    }
                }
            }
        }

        System.out.println(answer);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int i1 = sc.nextInt(); i1 sc.nextInt() sc.nextInt sc int i2 = sc.nextInt(); i2 sc.nextInt() sc.nextInt sc int i3 = sc.nextInt(); i3 sc.nextInt() sc.nextInt sc int i4 = sc.nextInt(); i4 sc.nextInt() sc.nextInt sc int answer = 0; answer 0 for (int i = 0; i <= i1; i++) {
            for (int j = 0; j <= i2; j++) {
                for (int k = 0; k <= i3; k++) {
                    if (i * 500 + j * 100 + k * 50 == i4) {
                        answer++;
                    }
                }
            }
        } int i = 0; int i = 0; i 0 i <= i1 i i1 i++ i++ i {
            for (int j = 0; j <= i2; j++) {
                for (int k = 0; k <= i3; k++) {
                    if (i * 500 + j * 100 + k * 50 == i4) {
                        answer++;
                    }
                }
            }
        } {
            for (int j = 0; j <= i2; j++) {
                for (int k = 0; k <= i3; k++) {
                    if (i * 500 + j * 100 + k * 50 == i4) {
                        answer++;
                    }
                }
            }
        } for (int j = 0; j <= i2; j++) {
                for (int k = 0; k <= i3; k++) {
                    if (i * 500 + j * 100 + k * 50 == i4) {
                        answer++;
                    }
                }
            } int j = 0; int j = 0; j 0 j <= i2 j i2 j++ j++ j {
                for (int k = 0; k <= i3; k++) {
                    if (i * 500 + j * 100 + k * 50 == i4) {
                        answer++;
                    }
                }
            } {
                for (int k = 0; k <= i3; k++) {
                    if (i * 500 + j * 100 + k * 50 == i4) {
                        answer++;
                    }
                }
            } for (int k = 0; k <= i3; k++) {
                    if (i * 500 + j * 100 + k * 50 == i4) {
                        answer++;
                    }
                } int k = 0; int k = 0; k 0 k <= i3 k i3 k++ k++ k {
                    if (i * 500 + j * 100 + k * 50 == i4) {
                        answer++;
                    }
                } {
                    if (i * 500 + j * 100 + k * 50 == i4) {
                        answer++;
                    }
                } if (i * 500 + j * 100 + k * 50 == i4) {
                        answer++;
                    } i * 500 + j * 100 + k * 50 == i4 i * 500 + j * 100 + k * 50 i * 500 + j * 100 + k * 50 i * 500 i 500 j * 100 j 100 k * 50 k 50 i4 {
                        answer++;
                    } answer++ answer 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 i1 = sc.nextInt();
        int i2 = sc.nextInt();
        int i3 = sc.nextInt();
        int i4 = sc.nextInt();

        int answer = 0;

        for (int i = 0; i <= i1; i++) {
            for (int j = 0; j <= i2; j++) {
                for (int k = 0; k <= i3; k++) {
                    if (i * 500 + j * 100 + k * 50 == i4) {
                        answer++;
                    }
                }
            }
        }

        System.out.println(answer);
    }
} public class Main {

    public static void main(String[] args) {

        Scanner sc = new Scanner(System.in);

        int i1 = sc.nextInt();
        int i2 = sc.nextInt();
        int i3 = sc.nextInt();
        int i4 = sc.nextInt();

        int answer = 0;

        for (int i = 0; i <= i1; i++) {
            for (int j = 0; j <= i2; j++) {
                for (int k = 0; k <= i3; k++) {
                    if (i * 500 + j * 100 + k * 50 == i4) {
                        answer++;
                    }
                }
            }
        }

        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 i1 = sc.nextInt();
        int i2 = sc.nextInt();
        int i3 = sc.nextInt();
        int i4 = sc.nextInt();

        int answer = 0;

        for (int i = 0; i <= i1; i++) {
            for (int j = 0; j <= i2; j++) {
                for (int k = 0; k <= i3; k++) {
                    if (i * 500 + j * 100 + k * 50 == i4) {
                        answer++;
                    }
                }
            }
        }

        System.out.println(answer);
    }
}
