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 pattern = 0;
        for(int k = 0; k <= a; k++) {
            for(int i = 0; i <= b; i++) {
                for(int j = 0; j <= c; j++) {
                    int sum = 500 * k + 100 * i + 50 * j;
                    if(sum == x) pattern++;
                    if(sum > x)break;
                }
            }
        }
        System.out.println(pattern);
    }
} 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 pattern = 0;
        for(int k = 0; k <= a; k++) {
            for(int i = 0; i <= b; i++) {
                for(int j = 0; j <= c; j++) {
                    int sum = 500 * k + 100 * i + 50 * j;
                    if(sum == x) pattern++;
                    if(sum > x)break;
                }
            }
        }
        System.out.println(pattern);
    }
} 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 pattern = 0;
        for(int k = 0; k <= a; k++) {
            for(int i = 0; i <= b; i++) {
                for(int j = 0; j <= c; j++) {
                    int sum = 500 * k + 100 * i + 50 * j;
                    if(sum == x) pattern++;
                    if(sum > x)break;
                }
            }
        }
        System.out.println(pattern);
    } main {
        Scanner sc= new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();
        int c = sc.nextInt();
        int x = sc.nextInt();
        int pattern = 0;
        for(int k = 0; k <= a; k++) {
            for(int i = 0; i <= b; i++) {
                for(int j = 0; j <= c; j++) {
                    int sum = 500 * k + 100 * i + 50 * j;
                    if(sum == x) pattern++;
                    if(sum > x)break;
                }
            }
        }
        System.out.println(pattern);
    } 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 pattern = 0; pattern 0 for(int k = 0; k <= a; k++) {
            for(int i = 0; i <= b; i++) {
                for(int j = 0; j <= c; j++) {
                    int sum = 500 * k + 100 * i + 50 * j;
                    if(sum == x) pattern++;
                    if(sum > x)break;
                }
            }
        } int k = 0; int k = 0; k 0 k <= a k a k++ k++ k {
            for(int i = 0; i <= b; i++) {
                for(int j = 0; j <= c; j++) {
                    int sum = 500 * k + 100 * i + 50 * j;
                    if(sum == x) pattern++;
                    if(sum > x)break;
                }
            }
        } {
            for(int i = 0; i <= b; i++) {
                for(int j = 0; j <= c; j++) {
                    int sum = 500 * k + 100 * i + 50 * j;
                    if(sum == x) pattern++;
                    if(sum > x)break;
                }
            }
        } for(int i = 0; i <= b; i++) {
                for(int j = 0; j <= c; j++) {
                    int sum = 500 * k + 100 * i + 50 * j;
                    if(sum == x) pattern++;
                    if(sum > x)break;
                }
            } int i = 0; int i = 0; i 0 i <= b i b i++ i++ i {
                for(int j = 0; j <= c; j++) {
                    int sum = 500 * k + 100 * i + 50 * j;
                    if(sum == x) pattern++;
                    if(sum > x)break;
                }
            } {
                for(int j = 0; j <= c; j++) {
                    int sum = 500 * k + 100 * i + 50 * j;
                    if(sum == x) pattern++;
                    if(sum > x)break;
                }
            } for(int j = 0; j <= c; j++) {
                    int sum = 500 * k + 100 * i + 50 * j;
                    if(sum == x) pattern++;
                    if(sum > x)break;
                } int j = 0; int j = 0; j 0 j <= c j c j++ j++ j {
                    int sum = 500 * k + 100 * i + 50 * j;
                    if(sum == x) pattern++;
                    if(sum > x)break;
                } {
                    int sum = 500 * k + 100 * i + 50 * j;
                    if(sum == x) pattern++;
                    if(sum > x)break;
                } int sum = 500 * k + 100 * i + 50 * j; sum 500 * k + 100 * i + 50 * j 500 * k + 100 * i + 50 * j 500 * k 500 k 100 * i 100 i 50 * j 50 j if(sum == x) pattern++; sum == x sum x pattern++ pattern if(sum > x)break; sum > x sum x break; System.out.println(pattern) System.out.println System.out System System.out pattern 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 pattern = 0;
        for(int k = 0; k <= a; k++) {
            for(int i = 0; i <= b; i++) {
                for(int j = 0; j <= c; j++) {
                    int sum = 500 * k + 100 * i + 50 * j;
                    if(sum == x) pattern++;
                    if(sum > x)break;
                }
            }
        }
        System.out.println(pattern);
    }
} 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 pattern = 0;
        for(int k = 0; k <= a; k++) {
            for(int i = 0; i <= b; i++) {
                for(int j = 0; j <= c; j++) {
                    int sum = 500 * k + 100 * i + 50 * j;
                    if(sum == x) pattern++;
                    if(sum > x)break;
                }
            }
        }
        System.out.println(pattern);
    }
} 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 pattern = 0;
        for(int k = 0; k <= a; k++) {
            for(int i = 0; i <= b; i++) {
                for(int j = 0; j <= c; j++) {
                    int sum = 500 * k + 100 * i + 50 * j;
                    if(sum == x) pattern++;
                    if(sum > x)break;
                }
            }
        }
        System.out.println(pattern);
    }
}