import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner cin = new Scanner(System.in);
        int A = cin.nextInt();
        int B = cin.nextInt();
        int C = cin.nextInt();
        int X = cin.nextInt();
        int cnt = 0;
        for (int a = 0; a <= A; a++) {
            for (int b = 0; b <= B; b++) {
                for (int c = 0; c <= C; c++) {
                    int x = (a * 500) + (b * 100) + (c * 50);
                    if (x == X) cnt++;
                }
            }
        }
        System.out.println(cnt);
    }
} import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {
        Scanner cin = new Scanner(System.in);
        int A = cin.nextInt();
        int B = cin.nextInt();
        int C = cin.nextInt();
        int X = cin.nextInt();
        int cnt = 0;
        for (int a = 0; a <= A; a++) {
            for (int b = 0; b <= B; b++) {
                for (int c = 0; c <= C; c++) {
                    int x = (a * 500) + (b * 100) + (c * 50);
                    if (x == X) cnt++;
                }
            }
        }
        System.out.println(cnt);
    }
} Main public static void main(String[] args) {
        Scanner cin = new Scanner(System.in);
        int A = cin.nextInt();
        int B = cin.nextInt();
        int C = cin.nextInt();
        int X = cin.nextInt();
        int cnt = 0;
        for (int a = 0; a <= A; a++) {
            for (int b = 0; b <= B; b++) {
                for (int c = 0; c <= C; c++) {
                    int x = (a * 500) + (b * 100) + (c * 50);
                    if (x == X) cnt++;
                }
            }
        }
        System.out.println(cnt);
    } main {
        Scanner cin = new Scanner(System.in);
        int A = cin.nextInt();
        int B = cin.nextInt();
        int C = cin.nextInt();
        int X = cin.nextInt();
        int cnt = 0;
        for (int a = 0; a <= A; a++) {
            for (int b = 0; b <= B; b++) {
                for (int c = 0; c <= C; c++) {
                    int x = (a * 500) + (b * 100) + (c * 50);
                    if (x == X) cnt++;
                }
            }
        }
        System.out.println(cnt);
    } Scanner cin = new Scanner(System.in); cin new Scanner(System.in) int A = cin.nextInt(); A cin.nextInt() cin.nextInt cin int B = cin.nextInt(); B cin.nextInt() cin.nextInt cin int C = cin.nextInt(); C cin.nextInt() cin.nextInt cin int X = cin.nextInt(); X cin.nextInt() cin.nextInt cin int cnt = 0; cnt 0 for (int a = 0; a <= A; a++) {
            for (int b = 0; b <= B; b++) {
                for (int c = 0; c <= C; c++) {
                    int x = (a * 500) + (b * 100) + (c * 50);
                    if (x == X) cnt++;
                }
            }
        } int a = 0; int a = 0; a 0 a <= A a A a++ a++ a {
            for (int b = 0; b <= B; b++) {
                for (int c = 0; c <= C; c++) {
                    int x = (a * 500) + (b * 100) + (c * 50);
                    if (x == X) cnt++;
                }
            }
        } {
            for (int b = 0; b <= B; b++) {
                for (int c = 0; c <= C; c++) {
                    int x = (a * 500) + (b * 100) + (c * 50);
                    if (x == X) cnt++;
                }
            }
        } for (int b = 0; b <= B; b++) {
                for (int c = 0; c <= C; c++) {
                    int x = (a * 500) + (b * 100) + (c * 50);
                    if (x == X) cnt++;
                }
            } int b = 0; int b = 0; b 0 b <= B b B b++ b++ b {
                for (int c = 0; c <= C; c++) {
                    int x = (a * 500) + (b * 100) + (c * 50);
                    if (x == X) cnt++;
                }
            } {
                for (int c = 0; c <= C; c++) {
                    int x = (a * 500) + (b * 100) + (c * 50);
                    if (x == X) cnt++;
                }
            } for (int c = 0; c <= C; c++) {
                    int x = (a * 500) + (b * 100) + (c * 50);
                    if (x == X) cnt++;
                } int c = 0; int c = 0; c 0 c <= C c C c++ c++ c {
                    int x = (a * 500) + (b * 100) + (c * 50);
                    if (x == X) cnt++;
                } {
                    int x = (a * 500) + (b * 100) + (c * 50);
                    if (x == X) cnt++;
                } int x = (a * 500) + (b * 100) + (c * 50); x (a * 500) + (b * 100) + (c * 50) (a * 500) + (b * 100) + (c * 50) (a * 500) a 500 (b * 100) b 100 (c * 50) c 50 if (x == X) cnt++; x == X x X cnt++ cnt System.out.println(cnt) System.out.println System.out System System.out cnt String[] args args public class Main {
    public static void main(String[] args) {
        Scanner cin = new Scanner(System.in);
        int A = cin.nextInt();
        int B = cin.nextInt();
        int C = cin.nextInt();
        int X = cin.nextInt();
        int cnt = 0;
        for (int a = 0; a <= A; a++) {
            for (int b = 0; b <= B; b++) {
                for (int c = 0; c <= C; c++) {
                    int x = (a * 500) + (b * 100) + (c * 50);
                    if (x == X) cnt++;
                }
            }
        }
        System.out.println(cnt);
    }
} public class Main {
    public static void main(String[] args) {
        Scanner cin = new Scanner(System.in);
        int A = cin.nextInt();
        int B = cin.nextInt();
        int C = cin.nextInt();
        int X = cin.nextInt();
        int cnt = 0;
        for (int a = 0; a <= A; a++) {
            for (int b = 0; b <= B; b++) {
                for (int c = 0; c <= C; c++) {
                    int x = (a * 500) + (b * 100) + (c * 50);
                    if (x == X) cnt++;
                }
            }
        }
        System.out.println(cnt);
    }
} Main
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner cin = new Scanner(System.in);
        int A = cin.nextInt();
        int B = cin.nextInt();
        int C = cin.nextInt();
        int X = cin.nextInt();
        int cnt = 0;
        for (int a = 0; a <= A; a++) {
            for (int b = 0; b <= B; b++) {
                for (int c = 0; c <= C; c++) {
                    int x = (a * 500) + (b * 100) + (c * 50);
                    if (x == X) cnt++;
                }
            }
        }
        System.out.println(cnt);
    }
}