import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int fivehundred = in.nextInt();
        int oneHundred = in.nextInt();
        int fifty = in.nextInt();
        int total = in.nextInt();

        int sum = 0;
        int patterns = 0;

        for (int i = 0; i < fivehundred + 1; i++) {
            for (int j = 0; j < oneHundred + 1; j++) {
                for (int k = 0; k < fifty + 1; k++) {
                    sum = 500 * i + 100 * j + 50 * k;
                    if (sum == total) {
                        patterns++;
                    }
                }
            }
        }
        System.out.println(patterns);
    }
} import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int fivehundred = in.nextInt();
        int oneHundred = in.nextInt();
        int fifty = in.nextInt();
        int total = in.nextInt();

        int sum = 0;
        int patterns = 0;

        for (int i = 0; i < fivehundred + 1; i++) {
            for (int j = 0; j < oneHundred + 1; j++) {
                for (int k = 0; k < fifty + 1; k++) {
                    sum = 500 * i + 100 * j + 50 * k;
                    if (sum == total) {
                        patterns++;
                    }
                }
            }
        }
        System.out.println(patterns);
    }
} Main public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int fivehundred = in.nextInt();
        int oneHundred = in.nextInt();
        int fifty = in.nextInt();
        int total = in.nextInt();

        int sum = 0;
        int patterns = 0;

        for (int i = 0; i < fivehundred + 1; i++) {
            for (int j = 0; j < oneHundred + 1; j++) {
                for (int k = 0; k < fifty + 1; k++) {
                    sum = 500 * i + 100 * j + 50 * k;
                    if (sum == total) {
                        patterns++;
                    }
                }
            }
        }
        System.out.println(patterns);
    } main {
        Scanner in = new Scanner(System.in);
        int fivehundred = in.nextInt();
        int oneHundred = in.nextInt();
        int fifty = in.nextInt();
        int total = in.nextInt();

        int sum = 0;
        int patterns = 0;

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

        int sum = 0;
        int patterns = 0;

        for (int i = 0; i < fivehundred + 1; i++) {
            for (int j = 0; j < oneHundred + 1; j++) {
                for (int k = 0; k < fifty + 1; k++) {
                    sum = 500 * i + 100 * j + 50 * k;
                    if (sum == total) {
                        patterns++;
                    }
                }
            }
        }
        System.out.println(patterns);
    }
} public class Main {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int fivehundred = in.nextInt();
        int oneHundred = in.nextInt();
        int fifty = in.nextInt();
        int total = in.nextInt();

        int sum = 0;
        int patterns = 0;

        for (int i = 0; i < fivehundred + 1; i++) {
            for (int j = 0; j < oneHundred + 1; j++) {
                for (int k = 0; k < fifty + 1; k++) {
                    sum = 500 * i + 100 * j + 50 * k;
                    if (sum == total) {
                        patterns++;
                    }
                }
            }
        }
        System.out.println(patterns);
    }
} Main
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int fivehundred = in.nextInt();
        int oneHundred = in.nextInt();
        int fifty = in.nextInt();
        int total = in.nextInt();

        int sum = 0;
        int patterns = 0;

        for (int i = 0; i < fivehundred + 1; i++) {
            for (int j = 0; j < oneHundred + 1; j++) {
                for (int k = 0; k < fifty + 1; k++) {
                    sum = 500 * i + 100 * j + 50 * k;
                    if (sum == total) {
                        patterns++;
                    }
                }
            }
        }
        System.out.println(patterns);
    }
}