import java.util.*;

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 ans = 0;
        int c500 = Math.min(A,X/500);
        for(int i=0;i<=c500;i++){
            int c100 = Math.min(B,(X-500*i)/100);
            for(int j=0;j<=c100;j++){
                int remain = X-i*500-j*100;
                if(remain/50<=C) ans += 1;
            }
        }
        System.out.println(ans);
    }
} import java.util.*; util.* java 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 ans = 0;
        int c500 = Math.min(A,X/500);
        for(int i=0;i<=c500;i++){
            int c100 = Math.min(B,(X-500*i)/100);
            for(int j=0;j<=c100;j++){
                int remain = X-i*500-j*100;
                if(remain/50<=C) ans += 1;
            }
        }
        System.out.println(ans);
    }
} 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 ans = 0;
        int c500 = Math.min(A,X/500);
        for(int i=0;i<=c500;i++){
            int c100 = Math.min(B,(X-500*i)/100);
            for(int j=0;j<=c100;j++){
                int remain = X-i*500-j*100;
                if(remain/50<=C) ans += 1;
            }
        }
        System.out.println(ans);
    } main {
        Scanner sc = new Scanner(System.in);
        int A = sc.nextInt();
        int B = sc.nextInt();
        int C = sc.nextInt();
        int X = sc.nextInt();
        int ans = 0;
        int c500 = Math.min(A,X/500);
        for(int i=0;i<=c500;i++){
            int c100 = Math.min(B,(X-500*i)/100);
            for(int j=0;j<=c100;j++){
                int remain = X-i*500-j*100;
                if(remain/50<=C) ans += 1;
            }
        }
        System.out.println(ans);
    } 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 ans = 0; ans 0 int c500 = Math.min(A,X/500); c500 Math.min(A,X/500) Math.min Math A X/500 X 500 for(int i=0;i<=c500;i++){
            int c100 = Math.min(B,(X-500*i)/100);
            for(int j=0;j<=c100;j++){
                int remain = X-i*500-j*100;
                if(remain/50<=C) ans += 1;
            }
        } int i=0; int i=0; i 0 i<=c500 i c500 i++ i++ i {
            int c100 = Math.min(B,(X-500*i)/100);
            for(int j=0;j<=c100;j++){
                int remain = X-i*500-j*100;
                if(remain/50<=C) ans += 1;
            }
        } {
            int c100 = Math.min(B,(X-500*i)/100);
            for(int j=0;j<=c100;j++){
                int remain = X-i*500-j*100;
                if(remain/50<=C) ans += 1;
            }
        } int c100 = Math.min(B,(X-500*i)/100); c100 Math.min(B,(X-500*i)/100) Math.min Math B (X-500*i)/100 (X-500*i) X 500*i 500 i 100 for(int j=0;j<=c100;j++){
                int remain = X-i*500-j*100;
                if(remain/50<=C) ans += 1;
            } int j=0; int j=0; j 0 j<=c100 j c100 j++ j++ j {
                int remain = X-i*500-j*100;
                if(remain/50<=C) ans += 1;
            } {
                int remain = X-i*500-j*100;
                if(remain/50<=C) ans += 1;
            } int remain = X-i*500-j*100; remain X-i*500-j*100 X-i*500-j*100 X i*500 i 500 j*100 j 100 if(remain/50<=C) ans += 1; remain/50<=C remain/50 remain 50 C ans += 1 ans 1 System.out.println(ans) System.out.println System.out System System.out ans String[] args args
import java.util.*;

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 ans = 0;
        int c500 = Math.min(A,X/500);
        for(int i=0;i<=c500;i++){
            int c100 = Math.min(B,(X-500*i)/100);
            for(int j=0;j<=c100;j++){
                int remain = X-i*500-j*100;
                if(remain/50<=C) ans += 1;
            }
        }
        System.out.println(ans);
    }
}