import java.lang.reflect.Array;
import java.math.BigDecimal;
import java.util.*;
import java.util.stream.Stream;

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 total = sc.nextInt();
        int count = 0;

        for(int i=0; i<=a; i++){
            for (int j=0; j<=b; j++){
                for (int k=0; k<=c; k++){
                    int ans = k*50 + j*100 + i*500;
                    if(ans == total){
                        count++;
                    }
                }
            }
        }

        System.out.println(count);
    }
} import java.lang.reflect.Array; Array java.lang.reflect import java.math.BigDecimal; BigDecimal java.math import java.util.*; util.* java import java.util.stream.Stream; Stream java.util.stream 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 total = sc.nextInt();
        int count = 0;

        for(int i=0; i<=a; i++){
            for (int j=0; j<=b; j++){
                for (int k=0; k<=c; k++){
                    int ans = k*50 + j*100 + i*500;
                    if(ans == total){
                        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 total = sc.nextInt();
        int count = 0;

        for(int i=0; i<=a; i++){
            for (int j=0; j<=b; j++){
                for (int k=0; k<=c; k++){
                    int ans = k*50 + j*100 + i*500;
                    if(ans == total){
                        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 total = sc.nextInt();
        int count = 0;

        for(int i=0; i<=a; i++){
            for (int j=0; j<=b; j++){
                for (int k=0; k<=c; k++){
                    int ans = k*50 + j*100 + i*500;
                    if(ans == total){
                        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 total = sc.nextInt(); total sc.nextInt() sc.nextInt sc int count = 0; count 0 for(int i=0; i<=a; i++){
            for (int j=0; j<=b; j++){
                for (int k=0; k<=c; k++){
                    int ans = k*50 + j*100 + i*500;
                    if(ans == total){
                        count++;
                    }
                }
            }
        } 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++){
                    int ans = k*50 + j*100 + i*500;
                    if(ans == total){
                        count++;
                    }
                }
            }
        } {
            for (int j=0; j<=b; j++){
                for (int k=0; k<=c; k++){
                    int ans = k*50 + j*100 + i*500;
                    if(ans == total){
                        count++;
                    }
                }
            }
        } for (int j=0; j<=b; j++){
                for (int k=0; k<=c; k++){
                    int ans = k*50 + j*100 + i*500;
                    if(ans == total){
                        count++;
                    }
                }
            } int j=0; int j=0; j 0 j<=b j b j++ j++ j {
                for (int k=0; k<=c; k++){
                    int ans = k*50 + j*100 + i*500;
                    if(ans == total){
                        count++;
                    }
                }
            } {
                for (int k=0; k<=c; k++){
                    int ans = k*50 + j*100 + i*500;
                    if(ans == total){
                        count++;
                    }
                }
            } for (int k=0; k<=c; k++){
                    int ans = k*50 + j*100 + i*500;
                    if(ans == total){
                        count++;
                    }
                } int k=0; int k=0; k 0 k<=c k c k++ k++ k {
                    int ans = k*50 + j*100 + i*500;
                    if(ans == total){
                        count++;
                    }
                } {
                    int ans = k*50 + j*100 + i*500;
                    if(ans == total){
                        count++;
                    }
                } int ans = k*50 + j*100 + i*500; ans k*50 + j*100 + i*500 k*50 + j*100 + i*500 k*50 k 50 j*100 j 100 i*500 i 500 if(ans == total){
                        count++;
                    } ans == total ans total {
                        count++;
                    } 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 total = sc.nextInt();
        int count = 0;

        for(int i=0; i<=a; i++){
            for (int j=0; j<=b; j++){
                for (int k=0; k<=c; k++){
                    int ans = k*50 + j*100 + i*500;
                    if(ans == total){
                        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 total = sc.nextInt();
        int count = 0;

        for(int i=0; i<=a; i++){
            for (int j=0; j<=b; j++){
                for (int k=0; k<=c; k++){
                    int ans = k*50 + j*100 + i*500;
                    if(ans == total){
                        count++;
                    }
                }
            }
        }

        System.out.println(count);
    }
} Main
import java.lang.reflect.Array;
import java.math.BigDecimal;
import java.util.*;
import java.util.stream.Stream;

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 total = sc.nextInt();
        int count = 0;

        for(int i=0; i<=a; i++){
            for (int j=0; j<=b; j++){
                for (int k=0; k<=c; k++){
                    int ans = k*50 + j*100 + i*500;
                    if(ans == total){
                        count++;
                    }
                }
            }
        }

        System.out.println(count);
    }
}
