import java.util.*;
 
class Main {
    public static void main(String args[]) {
        Scanner sc = new Scanner(System.in);
      
        int fiveHandredYenCoins = sc.nextInt();
        int oneHandredYenCoins = sc.nextInt();
        int fiftyYenCoins = sc.nextInt();
        int sumYen = sc.nextInt();
 
        int count = 0;
 
        for(int a=0;a<=fiveHandredYenCoins;a++) {
            for(int b=0;b<=oneHandredYenCoins;b++) {
                for(int c=0;c<=fiftyYenCoins;c++) {
                    if((500 * a) + (100 * b) + (50 * c) == sumYen) {
                        count++;
                    }
                }
            }
        }
        System.out.println(count);
    }
} import java.util.*; util.* java class Main {
    public static void main(String args[]) {
        Scanner sc = new Scanner(System.in);
      
        int fiveHandredYenCoins = sc.nextInt();
        int oneHandredYenCoins = sc.nextInt();
        int fiftyYenCoins = sc.nextInt();
        int sumYen = sc.nextInt();
 
        int count = 0;
 
        for(int a=0;a<=fiveHandredYenCoins;a++) {
            for(int b=0;b<=oneHandredYenCoins;b++) {
                for(int c=0;c<=fiftyYenCoins;c++) {
                    if((500 * a) + (100 * b) + (50 * c) == sumYen) {
                        count++;
                    }
                }
            }
        }
        System.out.println(count);
    }
} Main public static void main(String args[]) {
        Scanner sc = new Scanner(System.in);
      
        int fiveHandredYenCoins = sc.nextInt();
        int oneHandredYenCoins = sc.nextInt();
        int fiftyYenCoins = sc.nextInt();
        int sumYen = sc.nextInt();
 
        int count = 0;
 
        for(int a=0;a<=fiveHandredYenCoins;a++) {
            for(int b=0;b<=oneHandredYenCoins;b++) {
                for(int c=0;c<=fiftyYenCoins;c++) {
                    if((500 * a) + (100 * b) + (50 * c) == sumYen) {
                        count++;
                    }
                }
            }
        }
        System.out.println(count);
    } main {
        Scanner sc = new Scanner(System.in);
      
        int fiveHandredYenCoins = sc.nextInt();
        int oneHandredYenCoins = sc.nextInt();
        int fiftyYenCoins = sc.nextInt();
        int sumYen = sc.nextInt();
 
        int count = 0;
 
        for(int a=0;a<=fiveHandredYenCoins;a++) {
            for(int b=0;b<=oneHandredYenCoins;b++) {
                for(int c=0;c<=fiftyYenCoins;c++) {
                    if((500 * a) + (100 * b) + (50 * c) == sumYen) {
                        count++;
                    }
                }
            }
        }
        System.out.println(count);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int fiveHandredYenCoins = sc.nextInt(); fiveHandredYenCoins sc.nextInt() sc.nextInt sc int oneHandredYenCoins = sc.nextInt(); oneHandredYenCoins sc.nextInt() sc.nextInt sc int fiftyYenCoins = sc.nextInt(); fiftyYenCoins sc.nextInt() sc.nextInt sc int sumYen = sc.nextInt(); sumYen sc.nextInt() sc.nextInt sc int count = 0; count 0 for(int a=0;a<=fiveHandredYenCoins;a++) {
            for(int b=0;b<=oneHandredYenCoins;b++) {
                for(int c=0;c<=fiftyYenCoins;c++) {
                    if((500 * a) + (100 * b) + (50 * c) == sumYen) {
                        count++;
                    }
                }
            }
        } int a=0; int a=0; a 0 a<=fiveHandredYenCoins a fiveHandredYenCoins a++ a++ a {
            for(int b=0;b<=oneHandredYenCoins;b++) {
                for(int c=0;c<=fiftyYenCoins;c++) {
                    if((500 * a) + (100 * b) + (50 * c) == sumYen) {
                        count++;
                    }
                }
            }
        } {
            for(int b=0;b<=oneHandredYenCoins;b++) {
                for(int c=0;c<=fiftyYenCoins;c++) {
                    if((500 * a) + (100 * b) + (50 * c) == sumYen) {
                        count++;
                    }
                }
            }
        } for(int b=0;b<=oneHandredYenCoins;b++) {
                for(int c=0;c<=fiftyYenCoins;c++) {
                    if((500 * a) + (100 * b) + (50 * c) == sumYen) {
                        count++;
                    }
                }
            } int b=0; int b=0; b 0 b<=oneHandredYenCoins b oneHandredYenCoins b++ b++ b {
                for(int c=0;c<=fiftyYenCoins;c++) {
                    if((500 * a) + (100 * b) + (50 * c) == sumYen) {
                        count++;
                    }
                }
            } {
                for(int c=0;c<=fiftyYenCoins;c++) {
                    if((500 * a) + (100 * b) + (50 * c) == sumYen) {
                        count++;
                    }
                }
            } for(int c=0;c<=fiftyYenCoins;c++) {
                    if((500 * a) + (100 * b) + (50 * c) == sumYen) {
                        count++;
                    }
                } int c=0; int c=0; c 0 c<=fiftyYenCoins c fiftyYenCoins c++ c++ c {
                    if((500 * a) + (100 * b) + (50 * c) == sumYen) {
                        count++;
                    }
                } {
                    if((500 * a) + (100 * b) + (50 * c) == sumYen) {
                        count++;
                    }
                } if((500 * a) + (100 * b) + (50 * c) == sumYen) {
                        count++;
                    } (500 * a) + (100 * b) + (50 * c) == sumYen (500 * a) + (100 * b) + (50 * c) (500 * a) + (100 * b) + (50 * c) (500 * a) 500 a (100 * b) 100 b (50 * c) 50 c sumYen {
                        count++;
                    } count++ count System.out.println(count) System.out.println System.out System System.out count String args[] args
import java.util.*;
 
class Main {
    public static void main(String args[]) {
        Scanner sc = new Scanner(System.in);
      
        int fiveHandredYenCoins = sc.nextInt();
        int oneHandredYenCoins = sc.nextInt();
        int fiftyYenCoins = sc.nextInt();
        int sumYen = sc.nextInt();
 
        int count = 0;
 
        for(int a=0;a<=fiveHandredYenCoins;a++) {
            for(int b=0;b<=oneHandredYenCoins;b++) {
                for(int c=0;c<=fiftyYenCoins;c++) {
                    if((500 * a) + (100 * b) + (50 * c) == sumYen) {
                        count++;
                    }
                }
            }
        }
        System.out.println(count);
    }
}