import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b = sc.nextInt();
		int c = sc.nextInt();
		int x = sc.nextInt();

		int count = 0;
		for(int numA = 0;numA <= a;numA++) {
		    for(int numB = 0;numB <= b;numB++) {
		        int numC = (x - (500 * numA + 100 * numB)) / 50;
		        int total = 500 * numA + 100 * numB + 50 * numC;
		        if(numC >= 0 && numC <= c && total == x) count++;
		    }
		}

		System.out.println(count);
    }
} import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b = sc.nextInt();
		int c = sc.nextInt();
		int x = sc.nextInt();

		int count = 0;
		for(int numA = 0;numA <= a;numA++) {
		    for(int numB = 0;numB <= b;numB++) {
		        int numC = (x - (500 * numA + 100 * numB)) / 50;
		        int total = 500 * numA + 100 * numB + 50 * numC;
		        if(numC >= 0 && numC <= c && total == x) count++;
		    }
		}

		System.out.println(count);
    }
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b = sc.nextInt();
		int c = sc.nextInt();
		int x = sc.nextInt();

		int count = 0;
		for(int numA = 0;numA <= a;numA++) {
		    for(int numB = 0;numB <= b;numB++) {
		        int numC = (x - (500 * numA + 100 * numB)) / 50;
		        int total = 500 * numA + 100 * numB + 50 * numC;
		        if(numC >= 0 && numC <= c && total == x) count++;
		    }
		}

		System.out.println(count);
    } main {
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b = sc.nextInt();
		int c = sc.nextInt();
		int x = sc.nextInt();

		int count = 0;
		for(int numA = 0;numA <= a;numA++) {
		    for(int numB = 0;numB <= b;numB++) {
		        int numC = (x - (500 * numA + 100 * numB)) / 50;
		        int total = 500 * numA + 100 * numB + 50 * numC;
		        if(numC >= 0 && numC <= c && total == x) count++;
		    }
		}

		System.out.println(count);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int a = sc.nextInt(); a sc.nextInt() sc.nextInt sc int b = sc.nextInt(); b sc.nextInt() sc.nextInt sc int c = sc.nextInt(); c sc.nextInt() sc.nextInt sc int x = sc.nextInt(); x sc.nextInt() sc.nextInt sc int count = 0; count 0 for(int numA = 0;numA <= a;numA++) {
		    for(int numB = 0;numB <= b;numB++) {
		        int numC = (x - (500 * numA + 100 * numB)) / 50;
		        int total = 500 * numA + 100 * numB + 50 * numC;
		        if(numC >= 0 && numC <= c && total == x) count++;
		    }
		} int numA = 0; int numA = 0; numA 0 numA <= a numA a numA++ numA++ numA {
		    for(int numB = 0;numB <= b;numB++) {
		        int numC = (x - (500 * numA + 100 * numB)) / 50;
		        int total = 500 * numA + 100 * numB + 50 * numC;
		        if(numC >= 0 && numC <= c && total == x) count++;
		    }
		} {
		    for(int numB = 0;numB <= b;numB++) {
		        int numC = (x - (500 * numA + 100 * numB)) / 50;
		        int total = 500 * numA + 100 * numB + 50 * numC;
		        if(numC >= 0 && numC <= c && total == x) count++;
		    }
		} for(int numB = 0;numB <= b;numB++) {
		        int numC = (x - (500 * numA + 100 * numB)) / 50;
		        int total = 500 * numA + 100 * numB + 50 * numC;
		        if(numC >= 0 && numC <= c && total == x) count++;
		    } int numB = 0; int numB = 0; numB 0 numB <= b numB b numB++ numB++ numB {
		        int numC = (x - (500 * numA + 100 * numB)) / 50;
		        int total = 500 * numA + 100 * numB + 50 * numC;
		        if(numC >= 0 && numC <= c && total == x) count++;
		    } {
		        int numC = (x - (500 * numA + 100 * numB)) / 50;
		        int total = 500 * numA + 100 * numB + 50 * numC;
		        if(numC >= 0 && numC <= c && total == x) 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) 500 * numA 500 numA 100 * numB 100 numB 50 int total = 500 * numA + 100 * numB + 50 * numC; total 500 * numA + 100 * numB + 50 * numC 500 * numA + 100 * numB + 50 * numC 500 * numA 500 numA 100 * numB 100 numB 50 * numC 50 numC if(numC >= 0 && numC <= c && total == x) count++; numC >= 0 && numC <= c && total == x numC >= 0 && numC <= c && total == x numC >= 0 numC 0 numC <= c numC c total == x total x 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 a = sc.nextInt();
		int b = sc.nextInt();
		int c = sc.nextInt();
		int x = sc.nextInt();

		int count = 0;
		for(int numA = 0;numA <= a;numA++) {
		    for(int numB = 0;numB <= b;numB++) {
		        int numC = (x - (500 * numA + 100 * numB)) / 50;
		        int total = 500 * numA + 100 * numB + 50 * numC;
		        if(numC >= 0 && numC <= c && total == x) count++;
		    }
		}

		System.out.println(count);
    }
} public class Main {
    public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b = sc.nextInt();
		int c = sc.nextInt();
		int x = sc.nextInt();

		int count = 0;
		for(int numA = 0;numA <= a;numA++) {
		    for(int numB = 0;numB <= b;numB++) {
		        int numC = (x - (500 * numA + 100 * numB)) / 50;
		        int total = 500 * numA + 100 * numB + 50 * numC;
		        if(numC >= 0 && numC <= c && total == x) count++;
		    }
		}

		System.out.println(count);
    }
} Main
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b = sc.nextInt();
		int c = sc.nextInt();
		int x = sc.nextInt();

		int count = 0;
		for(int numA = 0;numA <= a;numA++) {
		    for(int numB = 0;numB <= b;numB++) {
		        int numC = (x - (500 * numA + 100 * numB)) / 50;
		        int total = 500 * numA + 100 * numB + 50 * numC;
		        if(numC >= 0 && numC <= c && total == x) count++;
		    }
		}

		System.out.println(count);
    }
}