import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int maxA = Integer.valueOf(sc.nextLine());
        int maxB = Integer.valueOf(sc.nextLine());
        int maxC = Integer.valueOf(sc.nextLine());
        int x = Integer.valueOf(sc.nextLine());
        int count = 0;
        for(int numA = 0; numA <= maxA; numA++){
            for(int numB = 0; numB <= maxB; numB++){
                int numC = (x - 500*numA - 100*numB) / 50;
                if(maxC >= numC && numC >= 0){
                    count++;
                }
            }
        }
        System.out.println(count);
        sc.close();
    }
} import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int maxA = Integer.valueOf(sc.nextLine());
        int maxB = Integer.valueOf(sc.nextLine());
        int maxC = Integer.valueOf(sc.nextLine());
        int x = Integer.valueOf(sc.nextLine());
        int count = 0;
        for(int numA = 0; numA <= maxA; numA++){
            for(int numB = 0; numB <= maxB; numB++){
                int numC = (x - 500*numA - 100*numB) / 50;
                if(maxC >= numC && numC >= 0){
                    count++;
                }
            }
        }
        System.out.println(count);
        sc.close();
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int maxA = Integer.valueOf(sc.nextLine());
        int maxB = Integer.valueOf(sc.nextLine());
        int maxC = Integer.valueOf(sc.nextLine());
        int x = Integer.valueOf(sc.nextLine());
        int count = 0;
        for(int numA = 0; numA <= maxA; numA++){
            for(int numB = 0; numB <= maxB; numB++){
                int numC = (x - 500*numA - 100*numB) / 50;
                if(maxC >= numC && numC >= 0){
                    count++;
                }
            }
        }
        System.out.println(count);
        sc.close();
    } main {
        Scanner sc = new Scanner(System.in);
        int maxA = Integer.valueOf(sc.nextLine());
        int maxB = Integer.valueOf(sc.nextLine());
        int maxC = Integer.valueOf(sc.nextLine());
        int x = Integer.valueOf(sc.nextLine());
        int count = 0;
        for(int numA = 0; numA <= maxA; numA++){
            for(int numB = 0; numB <= maxB; numB++){
                int numC = (x - 500*numA - 100*numB) / 50;
                if(maxC >= numC && numC >= 0){
                    count++;
                }
            }
        }
        System.out.println(count);
        sc.close();
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int maxA = Integer.valueOf(sc.nextLine()); maxA Integer.valueOf(sc.nextLine()) Integer.valueOf Integer sc.nextLine() sc.nextLine sc int maxB = Integer.valueOf(sc.nextLine()); maxB Integer.valueOf(sc.nextLine()) Integer.valueOf Integer sc.nextLine() sc.nextLine sc int maxC = Integer.valueOf(sc.nextLine()); maxC Integer.valueOf(sc.nextLine()) Integer.valueOf Integer sc.nextLine() sc.nextLine sc int x = Integer.valueOf(sc.nextLine()); x Integer.valueOf(sc.nextLine()) Integer.valueOf Integer sc.nextLine() sc.nextLine sc int count = 0; count 0 for(int numA = 0; numA <= maxA; numA++){
            for(int numB = 0; numB <= maxB; numB++){
                int numC = (x - 500*numA - 100*numB) / 50;
                if(maxC >= numC && numC >= 0){
                    count++;
                }
            }
        } int numA = 0; int numA = 0; numA 0 numA <= maxA numA maxA numA++ numA++ numA {
            for(int numB = 0; numB <= maxB; numB++){
                int numC = (x - 500*numA - 100*numB) / 50;
                if(maxC >= numC && numC >= 0){
                    count++;
                }
            }
        } {
            for(int numB = 0; numB <= maxB; numB++){
                int numC = (x - 500*numA - 100*numB) / 50;
                if(maxC >= numC && numC >= 0){
                    count++;
                }
            }
        } for(int numB = 0; numB <= maxB; numB++){
                int numC = (x - 500*numA - 100*numB) / 50;
                if(maxC >= numC && numC >= 0){
                    count++;
                }
            } int numB = 0; int numB = 0; numB 0 numB <= maxB numB maxB numB++ numB++ numB {
                int numC = (x - 500*numA - 100*numB) / 50;
                if(maxC >= numC && numC >= 0){
                    count++;
                }
            } {
                int numC = (x - 500*numA - 100*numB) / 50;
                if(maxC >= numC && numC >= 0){
                    count++;
                }
            } int numC = (x - 500*numA - 100*numB) / 50; numC (x - 500*numA - 100*numB) / 50 (x - 500*numA - 100*numB) x - 500*numA - 100*numB x 500*numA 500 numA 100*numB 100 numB 50 if(maxC >= numC && numC >= 0){
                    count++;
                } maxC >= numC && numC >= 0 maxC >= numC maxC numC numC >= 0 numC 0 {
                    count++;
                } count++ count System.out.println(count) System.out.println System.out System System.out count sc.close() sc.close sc String[] args args public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int maxA = Integer.valueOf(sc.nextLine());
        int maxB = Integer.valueOf(sc.nextLine());
        int maxC = Integer.valueOf(sc.nextLine());
        int x = Integer.valueOf(sc.nextLine());
        int count = 0;
        for(int numA = 0; numA <= maxA; numA++){
            for(int numB = 0; numB <= maxB; numB++){
                int numC = (x - 500*numA - 100*numB) / 50;
                if(maxC >= numC && numC >= 0){
                    count++;
                }
            }
        }
        System.out.println(count);
        sc.close();
    }
} public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int maxA = Integer.valueOf(sc.nextLine());
        int maxB = Integer.valueOf(sc.nextLine());
        int maxC = Integer.valueOf(sc.nextLine());
        int x = Integer.valueOf(sc.nextLine());
        int count = 0;
        for(int numA = 0; numA <= maxA; numA++){
            for(int numB = 0; numB <= maxB; numB++){
                int numC = (x - 500*numA - 100*numB) / 50;
                if(maxC >= numC && numC >= 0){
                    count++;
                }
            }
        }
        System.out.println(count);
        sc.close();
    }
} Main
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int maxA = Integer.valueOf(sc.nextLine());
        int maxB = Integer.valueOf(sc.nextLine());
        int maxC = Integer.valueOf(sc.nextLine());
        int x = Integer.valueOf(sc.nextLine());
        int count = 0;
        for(int numA = 0; numA <= maxA; numA++){
            for(int numB = 0; numB <= maxB; numB++){
                int numC = (x - 500*numA - 100*numB) / 50;
                if(maxC >= numC && numC >= 0){
                    count++;
                }
            }
        }
        System.out.println(count);
        sc.close();
    }
}