import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int count = 0;
        int gohyakuen = Integer.parseInt(sc.nextLine());
        int hyakuen = Integer.parseInt(sc.nextLine());
        int gojuen = Integer.parseInt(sc.nextLine());
        int x = Integer.parseInt(sc.nextLine());
        sc.close();
        for (int i = 0; i <= gohyakuen; i++) {
            if (i * 500 > x) {
                continue;
            }
            for (int j = 0; j <= hyakuen; j++) {
                if (i * 500 + j * 100 > x) {
                    continue;
                }
                for (int k = 0; k <= gojuen; k++) {
                    if (i * 500 + j * 100 + k * 50 == x) {
                        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 count = 0;
        int gohyakuen = Integer.parseInt(sc.nextLine());
        int hyakuen = Integer.parseInt(sc.nextLine());
        int gojuen = Integer.parseInt(sc.nextLine());
        int x = Integer.parseInt(sc.nextLine());
        sc.close();
        for (int i = 0; i <= gohyakuen; i++) {
            if (i * 500 > x) {
                continue;
            }
            for (int j = 0; j <= hyakuen; j++) {
                if (i * 500 + j * 100 > x) {
                    continue;
                }
                for (int k = 0; k <= gojuen; k++) {
                    if (i * 500 + j * 100 + k * 50 == x) {
                        count++;
                    }
                }
            }
        }
        System.out.println(count);
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int count = 0;
        int gohyakuen = Integer.parseInt(sc.nextLine());
        int hyakuen = Integer.parseInt(sc.nextLine());
        int gojuen = Integer.parseInt(sc.nextLine());
        int x = Integer.parseInt(sc.nextLine());
        sc.close();
        for (int i = 0; i <= gohyakuen; i++) {
            if (i * 500 > x) {
                continue;
            }
            for (int j = 0; j <= hyakuen; j++) {
                if (i * 500 + j * 100 > x) {
                    continue;
                }
                for (int k = 0; k <= gojuen; k++) {
                    if (i * 500 + j * 100 + k * 50 == x) {
                        count++;
                    }
                }
            }
        }
        System.out.println(count);
    } main {
        Scanner sc = new Scanner(System.in);
        int count = 0;
        int gohyakuen = Integer.parseInt(sc.nextLine());
        int hyakuen = Integer.parseInt(sc.nextLine());
        int gojuen = Integer.parseInt(sc.nextLine());
        int x = Integer.parseInt(sc.nextLine());
        sc.close();
        for (int i = 0; i <= gohyakuen; i++) {
            if (i * 500 > x) {
                continue;
            }
            for (int j = 0; j <= hyakuen; j++) {
                if (i * 500 + j * 100 > x) {
                    continue;
                }
                for (int k = 0; k <= gojuen; k++) {
                    if (i * 500 + j * 100 + k * 50 == x) {
                        count++;
                    }
                }
            }
        }
        System.out.println(count);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int count = 0; count 0 int gohyakuen = Integer.parseInt(sc.nextLine()); gohyakuen Integer.parseInt(sc.nextLine()) Integer.parseInt Integer sc.nextLine() sc.nextLine sc int hyakuen = Integer.parseInt(sc.nextLine()); hyakuen Integer.parseInt(sc.nextLine()) Integer.parseInt Integer sc.nextLine() sc.nextLine sc int gojuen = Integer.parseInt(sc.nextLine()); gojuen Integer.parseInt(sc.nextLine()) Integer.parseInt Integer sc.nextLine() sc.nextLine sc int x = Integer.parseInt(sc.nextLine()); x Integer.parseInt(sc.nextLine()) Integer.parseInt Integer sc.nextLine() sc.nextLine sc sc.close() sc.close sc for (int i = 0; i <= gohyakuen; i++) {
            if (i * 500 > x) {
                continue;
            }
            for (int j = 0; j <= hyakuen; j++) {
                if (i * 500 + j * 100 > x) {
                    continue;
                }
                for (int k = 0; k <= gojuen; k++) {
                    if (i * 500 + j * 100 + k * 50 == x) {
                        count++;
                    }
                }
            }
        } int i = 0; int i = 0; i 0 i <= gohyakuen i gohyakuen i++ i++ i {
            if (i * 500 > x) {
                continue;
            }
            for (int j = 0; j <= hyakuen; j++) {
                if (i * 500 + j * 100 > x) {
                    continue;
                }
                for (int k = 0; k <= gojuen; k++) {
                    if (i * 500 + j * 100 + k * 50 == x) {
                        count++;
                    }
                }
            }
        } {
            if (i * 500 > x) {
                continue;
            }
            for (int j = 0; j <= hyakuen; j++) {
                if (i * 500 + j * 100 > x) {
                    continue;
                }
                for (int k = 0; k <= gojuen; k++) {
                    if (i * 500 + j * 100 + k * 50 == x) {
                        count++;
                    }
                }
            }
        } if (i * 500 > x) {
                continue;
            } i * 500 > x i * 500 i 500 x {
                continue;
            } continue; for (int j = 0; j <= hyakuen; j++) {
                if (i * 500 + j * 100 > x) {
                    continue;
                }
                for (int k = 0; k <= gojuen; k++) {
                    if (i * 500 + j * 100 + k * 50 == x) {
                        count++;
                    }
                }
            } int j = 0; int j = 0; j 0 j <= hyakuen j hyakuen j++ j++ j {
                if (i * 500 + j * 100 > x) {
                    continue;
                }
                for (int k = 0; k <= gojuen; k++) {
                    if (i * 500 + j * 100 + k * 50 == x) {
                        count++;
                    }
                }
            } {
                if (i * 500 + j * 100 > x) {
                    continue;
                }
                for (int k = 0; k <= gojuen; k++) {
                    if (i * 500 + j * 100 + k * 50 == x) {
                        count++;
                    }
                }
            } if (i * 500 + j * 100 > x) {
                    continue;
                } i * 500 + j * 100 > x i * 500 + j * 100 i * 500 i 500 j * 100 j 100 x {
                    continue;
                } continue; for (int k = 0; k <= gojuen; k++) {
                    if (i * 500 + j * 100 + k * 50 == x) {
                        count++;
                    }
                } int k = 0; int k = 0; k 0 k <= gojuen k gojuen k++ k++ k {
                    if (i * 500 + j * 100 + k * 50 == x) {
                        count++;
                    }
                } {
                    if (i * 500 + j * 100 + k * 50 == x) {
                        count++;
                    }
                } if (i * 500 + j * 100 + k * 50 == x) {
                        count++;
                    } i * 500 + j * 100 + k * 50 == x i * 500 + j * 100 + k * 50 i * 500 + j * 100 + k * 50 i * 500 i 500 j * 100 j 100 k * 50 k 50 x {
                        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 count = 0;
        int gohyakuen = Integer.parseInt(sc.nextLine());
        int hyakuen = Integer.parseInt(sc.nextLine());
        int gojuen = Integer.parseInt(sc.nextLine());
        int x = Integer.parseInt(sc.nextLine());
        sc.close();
        for (int i = 0; i <= gohyakuen; i++) {
            if (i * 500 > x) {
                continue;
            }
            for (int j = 0; j <= hyakuen; j++) {
                if (i * 500 + j * 100 > x) {
                    continue;
                }
                for (int k = 0; k <= gojuen; k++) {
                    if (i * 500 + j * 100 + k * 50 == x) {
                        count++;
                    }
                }
            }
        }
        System.out.println(count);
    }
} public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int count = 0;
        int gohyakuen = Integer.parseInt(sc.nextLine());
        int hyakuen = Integer.parseInt(sc.nextLine());
        int gojuen = Integer.parseInt(sc.nextLine());
        int x = Integer.parseInt(sc.nextLine());
        sc.close();
        for (int i = 0; i <= gohyakuen; i++) {
            if (i * 500 > x) {
                continue;
            }
            for (int j = 0; j <= hyakuen; j++) {
                if (i * 500 + j * 100 > x) {
                    continue;
                }
                for (int k = 0; k <= gojuen; k++) {
                    if (i * 500 + j * 100 + k * 50 == x) {
                        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 count = 0;
        int gohyakuen = Integer.parseInt(sc.nextLine());
        int hyakuen = Integer.parseInt(sc.nextLine());
        int gojuen = Integer.parseInt(sc.nextLine());
        int x = Integer.parseInt(sc.nextLine());
        sc.close();
        for (int i = 0; i <= gohyakuen; i++) {
            if (i * 500 > x) {
                continue;
            }
            for (int j = 0; j <= hyakuen; j++) {
                if (i * 500 + j * 100 > x) {
                    continue;
                }
                for (int k = 0; k <= gojuen; k++) {
                    if (i * 500 + j * 100 + k * 50 == x) {
                        count++;
                    }
                }
            }
        }
        System.out.println(count);
    }
}
