import java.util.*;

public class Main {

    public static void main(String args[]) {

        // 入力
        Scanner sc = new Scanner(System.in);
        int a = Integer.parseInt(sc.next());
        int b = Integer.parseInt(sc.next());
        int c = Integer.parseInt(sc.next());
        int x = Integer.parseInt(sc.next());
        sc.close();

        // 主処理
        int result = 0;
        for (int i = 0; i <= a; i++) {
            for (int j = 0; j <= b; j++) {
                for (int j2 = 0; j2 <= c; j2++) {
                    int value = 500 * i + 100 * j + 50 * j2;
                    if (value == x) {
                        result++;
                    }
                }
            }
        }

        // 出力
        System.out.println(result);
    }
} import java.util.*; util.* java public class Main {

    public static void main(String args[]) {

        // 入力
        Scanner sc = new Scanner(System.in);
        int a = Integer.parseInt(sc.next());
        int b = Integer.parseInt(sc.next());
        int c = Integer.parseInt(sc.next());
        int x = Integer.parseInt(sc.next());
        sc.close();

        // 主処理
        int result = 0;
        for (int i = 0; i <= a; i++) {
            for (int j = 0; j <= b; j++) {
                for (int j2 = 0; j2 <= c; j2++) {
                    int value = 500 * i + 100 * j + 50 * j2;
                    if (value == x) {
                        result++;
                    }
                }
            }
        }

        // 出力
        System.out.println(result);
    }
} Main public static void main(String args[]) {

        // 入力
        Scanner sc = new Scanner(System.in);
        int a = Integer.parseInt(sc.next());
        int b = Integer.parseInt(sc.next());
        int c = Integer.parseInt(sc.next());
        int x = Integer.parseInt(sc.next());
        sc.close();

        // 主処理
        int result = 0;
        for (int i = 0; i <= a; i++) {
            for (int j = 0; j <= b; j++) {
                for (int j2 = 0; j2 <= c; j2++) {
                    int value = 500 * i + 100 * j + 50 * j2;
                    if (value == x) {
                        result++;
                    }
                }
            }
        }

        // 出力
        System.out.println(result);
    } main {

        // 入力
        Scanner sc = new Scanner(System.in);
        int a = Integer.parseInt(sc.next());
        int b = Integer.parseInt(sc.next());
        int c = Integer.parseInt(sc.next());
        int x = Integer.parseInt(sc.next());
        sc.close();

        // 主処理
        int result = 0;
        for (int i = 0; i <= a; i++) {
            for (int j = 0; j <= b; j++) {
                for (int j2 = 0; j2 <= c; j2++) {
                    int value = 500 * i + 100 * j + 50 * j2;
                    if (value == x) {
                        result++;
                    }
                }
            }
        }

        // 出力
        System.out.println(result);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int a = Integer.parseInt(sc.next()); a Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc int b = Integer.parseInt(sc.next()); b Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc int c = Integer.parseInt(sc.next()); c Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc int x = Integer.parseInt(sc.next()); x Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc sc.close() sc.close sc int result = 0; result 0 for (int i = 0; i <= a; i++) {
            for (int j = 0; j <= b; j++) {
                for (int j2 = 0; j2 <= c; j2++) {
                    int value = 500 * i + 100 * j + 50 * j2;
                    if (value == x) {
                        result++;
                    }
                }
            }
        } int i = 0; int i = 0; i 0 i <= a i a i++ i++ i {
            for (int j = 0; j <= b; j++) {
                for (int j2 = 0; j2 <= c; j2++) {
                    int value = 500 * i + 100 * j + 50 * j2;
                    if (value == x) {
                        result++;
                    }
                }
            }
        } {
            for (int j = 0; j <= b; j++) {
                for (int j2 = 0; j2 <= c; j2++) {
                    int value = 500 * i + 100 * j + 50 * j2;
                    if (value == x) {
                        result++;
                    }
                }
            }
        } for (int j = 0; j <= b; j++) {
                for (int j2 = 0; j2 <= c; j2++) {
                    int value = 500 * i + 100 * j + 50 * j2;
                    if (value == x) {
                        result++;
                    }
                }
            } int j = 0; int j = 0; j 0 j <= b j b j++ j++ j {
                for (int j2 = 0; j2 <= c; j2++) {
                    int value = 500 * i + 100 * j + 50 * j2;
                    if (value == x) {
                        result++;
                    }
                }
            } {
                for (int j2 = 0; j2 <= c; j2++) {
                    int value = 500 * i + 100 * j + 50 * j2;
                    if (value == x) {
                        result++;
                    }
                }
            } for (int j2 = 0; j2 <= c; j2++) {
                    int value = 500 * i + 100 * j + 50 * j2;
                    if (value == x) {
                        result++;
                    }
                } int j2 = 0; int j2 = 0; j2 0 j2 <= c j2 c j2++ j2++ j2 {
                    int value = 500 * i + 100 * j + 50 * j2;
                    if (value == x) {
                        result++;
                    }
                } {
                    int value = 500 * i + 100 * j + 50 * j2;
                    if (value == x) {
                        result++;
                    }
                } int value = 500 * i + 100 * j + 50 * j2; value 500 * i + 100 * j + 50 * j2 500 * i + 100 * j + 50 * j2 500 * i 500 i 100 * j 100 j 50 * j2 50 j2 if (value == x) {
                        result++;
                    } value == x value x {
                        result++;
                    } result++ result System.out.println(result) System.out.println System.out System System.out result String args[] args public class Main {

    public static void main(String args[]) {

        // 入力
        Scanner sc = new Scanner(System.in);
        int a = Integer.parseInt(sc.next());
        int b = Integer.parseInt(sc.next());
        int c = Integer.parseInt(sc.next());
        int x = Integer.parseInt(sc.next());
        sc.close();

        // 主処理
        int result = 0;
        for (int i = 0; i <= a; i++) {
            for (int j = 0; j <= b; j++) {
                for (int j2 = 0; j2 <= c; j2++) {
                    int value = 500 * i + 100 * j + 50 * j2;
                    if (value == x) {
                        result++;
                    }
                }
            }
        }

        // 出力
        System.out.println(result);
    }
} public class Main {

    public static void main(String args[]) {

        // 入力
        Scanner sc = new Scanner(System.in);
        int a = Integer.parseInt(sc.next());
        int b = Integer.parseInt(sc.next());
        int c = Integer.parseInt(sc.next());
        int x = Integer.parseInt(sc.next());
        sc.close();

        // 主処理
        int result = 0;
        for (int i = 0; i <= a; i++) {
            for (int j = 0; j <= b; j++) {
                for (int j2 = 0; j2 <= c; j2++) {
                    int value = 500 * i + 100 * j + 50 * j2;
                    if (value == x) {
                        result++;
                    }
                }
            }
        }

        // 出力
        System.out.println(result);
    }
} Main
import java.util.*;

public class Main {

    public static void main(String args[]) {

        // 入力
        Scanner sc = new Scanner(System.in);
        int a = Integer.parseInt(sc.next());
        int b = Integer.parseInt(sc.next());
        int c = Integer.parseInt(sc.next());
        int x = Integer.parseInt(sc.next());
        sc.close();

        // 主処理
        int result = 0;
        for (int i = 0; i <= a; i++) {
            for (int j = 0; j <= b; j++) {
                for (int j2 = 0; j2 <= c; j2++) {
                    int value = 500 * i + 100 * j + 50 * j2;
                    if (value == x) {
                        result++;
                    }
                }
            }
        }

        // 出力
        System.out.println(result);
    }
}
