import java.util.Scanner;
class Main{
    public static void main(String[] args) {
        Scanner scn= new Scanner(System.in);
        int a=scn.nextInt();
        int b=scn.nextInt();
        int c=scn.nextInt();
        int x=scn.nextInt();
        int answer=0;
        for(int i=0;i<=a;i++){
            for(int j=0;j<=b;j++){
                for(int k=0;k<=c;k++){
                    if(500*i+100*j+50*k==x) answer++;
                }
            }
        }
        System.out.println(answer);
    }
} import java.util.Scanner; Scanner java.util class Main{
    public static void main(String[] args) {
        Scanner scn= new Scanner(System.in);
        int a=scn.nextInt();
        int b=scn.nextInt();
        int c=scn.nextInt();
        int x=scn.nextInt();
        int answer=0;
        for(int i=0;i<=a;i++){
            for(int j=0;j<=b;j++){
                for(int k=0;k<=c;k++){
                    if(500*i+100*j+50*k==x) answer++;
                }
            }
        }
        System.out.println(answer);
    }
} Main public static void main(String[] args) {
        Scanner scn= new Scanner(System.in);
        int a=scn.nextInt();
        int b=scn.nextInt();
        int c=scn.nextInt();
        int x=scn.nextInt();
        int answer=0;
        for(int i=0;i<=a;i++){
            for(int j=0;j<=b;j++){
                for(int k=0;k<=c;k++){
                    if(500*i+100*j+50*k==x) answer++;
                }
            }
        }
        System.out.println(answer);
    } main {
        Scanner scn= new Scanner(System.in);
        int a=scn.nextInt();
        int b=scn.nextInt();
        int c=scn.nextInt();
        int x=scn.nextInt();
        int answer=0;
        for(int i=0;i<=a;i++){
            for(int j=0;j<=b;j++){
                for(int k=0;k<=c;k++){
                    if(500*i+100*j+50*k==x) answer++;
                }
            }
        }
        System.out.println(answer);
    } Scanner scn= new Scanner(System.in); scn new Scanner(System.in) int a=scn.nextInt(); a scn.nextInt() scn.nextInt scn int b=scn.nextInt(); b scn.nextInt() scn.nextInt scn int c=scn.nextInt(); c scn.nextInt() scn.nextInt scn int x=scn.nextInt(); x scn.nextInt() scn.nextInt scn int answer=0; answer 0 for(int i=0;i<=a;i++){
            for(int j=0;j<=b;j++){
                for(int k=0;k<=c;k++){
                    if(500*i+100*j+50*k==x) answer++;
                }
            }
        } int i=0; int i=0; i 0 i<=a i a i++ i++ i {
            for(int j=0;j<=b;j++){
                for(int k=0;k<=c;k++){
                    if(500*i+100*j+50*k==x) answer++;
                }
            }
        } {
            for(int j=0;j<=b;j++){
                for(int k=0;k<=c;k++){
                    if(500*i+100*j+50*k==x) answer++;
                }
            }
        } for(int j=0;j<=b;j++){
                for(int k=0;k<=c;k++){
                    if(500*i+100*j+50*k==x) answer++;
                }
            } int j=0; int j=0; j 0 j<=b j b j++ j++ j {
                for(int k=0;k<=c;k++){
                    if(500*i+100*j+50*k==x) answer++;
                }
            } {
                for(int k=0;k<=c;k++){
                    if(500*i+100*j+50*k==x) answer++;
                }
            } for(int k=0;k<=c;k++){
                    if(500*i+100*j+50*k==x) answer++;
                } int k=0; int k=0; k 0 k<=c k c k++ k++ k {
                    if(500*i+100*j+50*k==x) answer++;
                } {
                    if(500*i+100*j+50*k==x) answer++;
                } if(500*i+100*j+50*k==x) answer++; 500*i+100*j+50*k==x 500*i+100*j+50*k 500*i+100*j+50*k 500*i 500 i 100*j 100 j 50*k 50 k x answer++ answer System.out.println(answer) System.out.println System.out System System.out answer String[] args args
import java.util.Scanner;
class Main{
    public static void main(String[] args) {
        Scanner scn= new Scanner(System.in);
        int a=scn.nextInt();
        int b=scn.nextInt();
        int c=scn.nextInt();
        int x=scn.nextInt();
        int answer=0;
        for(int i=0;i<=a;i++){
            for(int j=0;j<=b;j++){
                for(int k=0;k<=c;k++){
                    if(500*i+100*j+50*k==x) answer++;
                }
            }
        }
        System.out.println(answer);
    }
}