import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int nFiveHundred = sc.nextInt();
        int nHundred = sc.nextInt();
        int nFifty = sc.nextInt();
        int target = sc.nextInt();

        int count = 0;
        for (int i = 0; i <= nFiveHundred; i++) {
            for (int j = 0; j <= nHundred; j++) {
                for (int k = 0; k <= nFifty; k++) {
                    if (500 * i + 100 * j + 50 * k == target) {
                        ++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 nFiveHundred = sc.nextInt();
        int nHundred = sc.nextInt();
        int nFifty = sc.nextInt();
        int target = sc.nextInt();

        int count = 0;
        for (int i = 0; i <= nFiveHundred; i++) {
            for (int j = 0; j <= nHundred; j++) {
                for (int k = 0; k <= nFifty; k++) {
                    if (500 * i + 100 * j + 50 * k == target) {
                        ++count;
                    }
                }
            }
        }
        System.out.println(count);
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int nFiveHundred = sc.nextInt();
        int nHundred = sc.nextInt();
        int nFifty = sc.nextInt();
        int target = sc.nextInt();

        int count = 0;
        for (int i = 0; i <= nFiveHundred; i++) {
            for (int j = 0; j <= nHundred; j++) {
                for (int k = 0; k <= nFifty; k++) {
                    if (500 * i + 100 * j + 50 * k == target) {
                        ++count;
                    }
                }
            }
        }
        System.out.println(count);
    } main {
        Scanner sc = new Scanner(System.in);
        int nFiveHundred = sc.nextInt();
        int nHundred = sc.nextInt();
        int nFifty = sc.nextInt();
        int target = sc.nextInt();

        int count = 0;
        for (int i = 0; i <= nFiveHundred; i++) {
            for (int j = 0; j <= nHundred; j++) {
                for (int k = 0; k <= nFifty; k++) {
                    if (500 * i + 100 * j + 50 * k == target) {
                        ++count;
                    }
                }
            }
        }
        System.out.println(count);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int nFiveHundred = sc.nextInt(); nFiveHundred sc.nextInt() sc.nextInt sc int nHundred = sc.nextInt(); nHundred sc.nextInt() sc.nextInt sc int nFifty = sc.nextInt(); nFifty sc.nextInt() sc.nextInt sc int target = sc.nextInt(); target sc.nextInt() sc.nextInt sc int count = 0; count 0 for (int i = 0; i <= nFiveHundred; i++) {
            for (int j = 0; j <= nHundred; j++) {
                for (int k = 0; k <= nFifty; k++) {
                    if (500 * i + 100 * j + 50 * k == target) {
                        ++count;
                    }
                }
            }
        } int i = 0; int i = 0; i 0 i <= nFiveHundred i nFiveHundred i++ i++ i {
            for (int j = 0; j <= nHundred; j++) {
                for (int k = 0; k <= nFifty; k++) {
                    if (500 * i + 100 * j + 50 * k == target) {
                        ++count;
                    }
                }
            }
        } {
            for (int j = 0; j <= nHundred; j++) {
                for (int k = 0; k <= nFifty; k++) {
                    if (500 * i + 100 * j + 50 * k == target) {
                        ++count;
                    }
                }
            }
        } for (int j = 0; j <= nHundred; j++) {
                for (int k = 0; k <= nFifty; k++) {
                    if (500 * i + 100 * j + 50 * k == target) {
                        ++count;
                    }
                }
            } int j = 0; int j = 0; j 0 j <= nHundred j nHundred j++ j++ j {
                for (int k = 0; k <= nFifty; k++) {
                    if (500 * i + 100 * j + 50 * k == target) {
                        ++count;
                    }
                }
            } {
                for (int k = 0; k <= nFifty; k++) {
                    if (500 * i + 100 * j + 50 * k == target) {
                        ++count;
                    }
                }
            } for (int k = 0; k <= nFifty; k++) {
                    if (500 * i + 100 * j + 50 * k == target) {
                        ++count;
                    }
                } int k = 0; int k = 0; k 0 k <= nFifty k nFifty k++ k++ k {
                    if (500 * i + 100 * j + 50 * k == target) {
                        ++count;
                    }
                } {
                    if (500 * i + 100 * j + 50 * k == target) {
                        ++count;
                    }
                } if (500 * i + 100 * j + 50 * k == target) {
                        ++count;
                    } 500 * i + 100 * j + 50 * k == target 500 * i + 100 * j + 50 * k 500 * i + 100 * j + 50 * k 500 * i 500 i 100 * j 100 j 50 * k 50 k target {
                        ++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 nFiveHundred = sc.nextInt();
        int nHundred = sc.nextInt();
        int nFifty = sc.nextInt();
        int target = sc.nextInt();

        int count = 0;
        for (int i = 0; i <= nFiveHundred; i++) {
            for (int j = 0; j <= nHundred; j++) {
                for (int k = 0; k <= nFifty; k++) {
                    if (500 * i + 100 * j + 50 * k == target) {
                        ++count;
                    }
                }
            }
        }
        System.out.println(count);
    }
} public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int nFiveHundred = sc.nextInt();
        int nHundred = sc.nextInt();
        int nFifty = sc.nextInt();
        int target = sc.nextInt();

        int count = 0;
        for (int i = 0; i <= nFiveHundred; i++) {
            for (int j = 0; j <= nHundred; j++) {
                for (int k = 0; k <= nFifty; k++) {
                    if (500 * i + 100 * j + 50 * k == target) {
                        ++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 nFiveHundred = sc.nextInt();
        int nHundred = sc.nextInt();
        int nFifty = sc.nextInt();
        int target = sc.nextInt();

        int count = 0;
        for (int i = 0; i <= nFiveHundred; i++) {
            for (int j = 0; j <= nHundred; j++) {
                for (int k = 0; k <= nFifty; k++) {
                    if (500 * i + 100 * j + 50 * k == target) {
                        ++count;
                    }
                }
            }
        }
        System.out.println(count);
    }
}