import java.util.Scanner;

public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        int num1 = sc.nextInt();
        int num2 = sc.nextInt();
        int num3 = sc.nextInt();
        int total = sc.nextInt();
        int result = 0;

        for(int i = 0; i <= num1; i++) {
            for(int j = 0; j <= num2; j++) {
                for(int k = 0; k <= num3; k++) {
                	if (500 * i + 100 * j + 50 * k == total) {
                		result++;
                	}
                }
            }
        }
        System.out.println(result);
    }
} import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        int num1 = sc.nextInt();
        int num2 = sc.nextInt();
        int num3 = sc.nextInt();
        int total = sc.nextInt();
        int result = 0;

        for(int i = 0; i <= num1; i++) {
            for(int j = 0; j <= num2; j++) {
                for(int k = 0; k <= num3; k++) {
                	if (500 * i + 100 * j + 50 * k == total) {
                		result++;
                	}
                }
            }
        }
        System.out.println(result);
    }
} Main public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        int num1 = sc.nextInt();
        int num2 = sc.nextInt();
        int num3 = sc.nextInt();
        int total = sc.nextInt();
        int result = 0;

        for(int i = 0; i <= num1; i++) {
            for(int j = 0; j <= num2; j++) {
                for(int k = 0; k <= num3; k++) {
                	if (500 * i + 100 * j + 50 * k == total) {
                		result++;
                	}
                }
            }
        }
        System.out.println(result);
    } main {
        Scanner sc = new Scanner(System.in);
        int num1 = sc.nextInt();
        int num2 = sc.nextInt();
        int num3 = sc.nextInt();
        int total = sc.nextInt();
        int result = 0;

        for(int i = 0; i <= num1; i++) {
            for(int j = 0; j <= num2; j++) {
                for(int k = 0; k <= num3; k++) {
                	if (500 * i + 100 * j + 50 * k == total) {
                		result++;
                	}
                }
            }
        }
        System.out.println(result);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int num1 = sc.nextInt(); num1 sc.nextInt() sc.nextInt sc int num2 = sc.nextInt(); num2 sc.nextInt() sc.nextInt sc int num3 = sc.nextInt(); num3 sc.nextInt() sc.nextInt sc int total = sc.nextInt(); total sc.nextInt() sc.nextInt sc int result = 0; result 0 for(int i = 0; i <= num1; i++) {
            for(int j = 0; j <= num2; j++) {
                for(int k = 0; k <= num3; k++) {
                	if (500 * i + 100 * j + 50 * k == total) {
                		result++;
                	}
                }
            }
        } int i = 0; int i = 0; i 0 i <= num1 i num1 i++ i++ i {
            for(int j = 0; j <= num2; j++) {
                for(int k = 0; k <= num3; k++) {
                	if (500 * i + 100 * j + 50 * k == total) {
                		result++;
                	}
                }
            }
        } {
            for(int j = 0; j <= num2; j++) {
                for(int k = 0; k <= num3; k++) {
                	if (500 * i + 100 * j + 50 * k == total) {
                		result++;
                	}
                }
            }
        } for(int j = 0; j <= num2; j++) {
                for(int k = 0; k <= num3; k++) {
                	if (500 * i + 100 * j + 50 * k == total) {
                		result++;
                	}
                }
            } int j = 0; int j = 0; j 0 j <= num2 j num2 j++ j++ j {
                for(int k = 0; k <= num3; k++) {
                	if (500 * i + 100 * j + 50 * k == total) {
                		result++;
                	}
                }
            } {
                for(int k = 0; k <= num3; k++) {
                	if (500 * i + 100 * j + 50 * k == total) {
                		result++;
                	}
                }
            } for(int k = 0; k <= num3; k++) {
                	if (500 * i + 100 * j + 50 * k == total) {
                		result++;
                	}
                } int k = 0; int k = 0; k 0 k <= num3 k num3 k++ k++ k {
                	if (500 * i + 100 * j + 50 * k == total) {
                		result++;
                	}
                } {
                	if (500 * i + 100 * j + 50 * k == total) {
                		result++;
                	}
                } if (500 * i + 100 * j + 50 * k == total) {
                		result++;
                	} 500 * i + 100 * j + 50 * k == total 500 * i + 100 * j + 50 * k 500 * i + 100 * j + 50 * k 500 * i 500 i 100 * j 100 j 50 * k 50 k total {
                		result++;
                	} result++ result System.out.println(result) System.out.println System.out System System.out result String[] args args public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        int num1 = sc.nextInt();
        int num2 = sc.nextInt();
        int num3 = sc.nextInt();
        int total = sc.nextInt();
        int result = 0;

        for(int i = 0; i <= num1; i++) {
            for(int j = 0; j <= num2; j++) {
                for(int k = 0; k <= num3; k++) {
                	if (500 * i + 100 * j + 50 * k == total) {
                		result++;
                	}
                }
            }
        }
        System.out.println(result);
    }
} public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        int num1 = sc.nextInt();
        int num2 = sc.nextInt();
        int num3 = sc.nextInt();
        int total = sc.nextInt();
        int result = 0;

        for(int i = 0; i <= num1; i++) {
            for(int j = 0; j <= num2; j++) {
                for(int k = 0; k <= num3; k++) {
                	if (500 * i + 100 * j + 50 * k == total) {
                		result++;
                	}
                }
            }
        }
        System.out.println(result);
    }
} Main
import java.util.Scanner;

public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        int num1 = sc.nextInt();
        int num2 = sc.nextInt();
        int num3 = sc.nextInt();
        int total = sc.nextInt();
        int result = 0;

        for(int i = 0; i <= num1; i++) {
            for(int j = 0; j <= num2; j++) {
                for(int k = 0; k <= num3; k++) {
                	if (500 * i + 100 * j + 50 * k == total) {
                		result++;
                	}
                }
            }
        }
        System.out.println(result);
    }
}