import java.io.BufferedReader;
import java.io.InputStreamReader;

public class Main {
    public static void main(String args[]) throws Exception{
        BufferedReader stdR = new BufferedReader(new InputStreamReader(System.in));
        int A = Integer.parseInt(stdR.readLine());
        int B = Integer.parseInt(stdR.readLine());
        int C = Integer.parseInt(stdR.readLine());
        int X = Integer.parseInt(stdR.readLine());
        int count = 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)count++;
                }
            }
        }
        System.out.println(count);
    }
} import java.io.BufferedReader; BufferedReader java.io import java.io.InputStreamReader; InputStreamReader java.io public class Main {
    public static void main(String args[]) throws Exception{
        BufferedReader stdR = new BufferedReader(new InputStreamReader(System.in));
        int A = Integer.parseInt(stdR.readLine());
        int B = Integer.parseInt(stdR.readLine());
        int C = Integer.parseInt(stdR.readLine());
        int X = Integer.parseInt(stdR.readLine());
        int count = 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)count++;
                }
            }
        }
        System.out.println(count);
    }
} Main public static void main(String args[]) throws Exception{
        BufferedReader stdR = new BufferedReader(new InputStreamReader(System.in));
        int A = Integer.parseInt(stdR.readLine());
        int B = Integer.parseInt(stdR.readLine());
        int C = Integer.parseInt(stdR.readLine());
        int X = Integer.parseInt(stdR.readLine());
        int count = 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)count++;
                }
            }
        }
        System.out.println(count);
    } main {
        BufferedReader stdR = new BufferedReader(new InputStreamReader(System.in));
        int A = Integer.parseInt(stdR.readLine());
        int B = Integer.parseInt(stdR.readLine());
        int C = Integer.parseInt(stdR.readLine());
        int X = Integer.parseInt(stdR.readLine());
        int count = 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)count++;
                }
            }
        }
        System.out.println(count);
    } BufferedReader stdR = new BufferedReader(new InputStreamReader(System.in)); stdR new BufferedReader(new InputStreamReader(System.in)) int A = Integer.parseInt(stdR.readLine()); A Integer.parseInt(stdR.readLine()) Integer.parseInt Integer stdR.readLine() stdR.readLine stdR int B = Integer.parseInt(stdR.readLine()); B Integer.parseInt(stdR.readLine()) Integer.parseInt Integer stdR.readLine() stdR.readLine stdR int C = Integer.parseInt(stdR.readLine()); C Integer.parseInt(stdR.readLine()) Integer.parseInt Integer stdR.readLine() stdR.readLine stdR int X = Integer.parseInt(stdR.readLine()); X Integer.parseInt(stdR.readLine()) Integer.parseInt Integer stdR.readLine() stdR.readLine stdR 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++) {
                    if((500 * i + 100 * j + 50 * k) == X)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++) {
                    if((500 * i + 100 * j + 50 * k) == X)count++;
                }
            }
        } {
            for(int j = 0 ; j <= B ; j++) {
                for(int k = 0 ; k <= C ; k++) {
                    if((500 * i + 100 * j + 50 * k) == X)count++;
                }
            }
        } for(int j = 0 ; j <= B ; j++) {
                for(int k = 0 ; k <= C ; k++) {
                    if((500 * i + 100 * j + 50 * k) == X)count++;
                }
            } 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)count++;
                }
            } {
                for(int k = 0 ; k <= C ; k++) {
                    if((500 * i + 100 * j + 50 * k) == X)count++;
                }
            } for(int k = 0 ; k <= C ; k++) {
                    if((500 * i + 100 * j + 50 * k) == X)count++;
                } int k = 0 ; int k = 0 ; k 0 k <= C k C k++ k++ k {
                    if((500 * i + 100 * j + 50 * k) == X)count++;
                } {
                    if((500 * i + 100 * j + 50 * k) == X)count++;
                } if((500 * i + 100 * j + 50 * k) == X)count++; (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 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[]) throws Exception{
        BufferedReader stdR = new BufferedReader(new InputStreamReader(System.in));
        int A = Integer.parseInt(stdR.readLine());
        int B = Integer.parseInt(stdR.readLine());
        int C = Integer.parseInt(stdR.readLine());
        int X = Integer.parseInt(stdR.readLine());
        int count = 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)count++;
                }
            }
        }
        System.out.println(count);
    }
} public class Main {
    public static void main(String args[]) throws Exception{
        BufferedReader stdR = new BufferedReader(new InputStreamReader(System.in));
        int A = Integer.parseInt(stdR.readLine());
        int B = Integer.parseInt(stdR.readLine());
        int C = Integer.parseInt(stdR.readLine());
        int X = Integer.parseInt(stdR.readLine());
        int count = 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)count++;
                }
            }
        }
        System.out.println(count);
    }
} Main
import java.io.BufferedReader;
import java.io.InputStreamReader;

public class Main {
    public static void main(String args[]) throws Exception{
        BufferedReader stdR = new BufferedReader(new InputStreamReader(System.in));
        int A = Integer.parseInt(stdR.readLine());
        int B = Integer.parseInt(stdR.readLine());
        int C = Integer.parseInt(stdR.readLine());
        int X = Integer.parseInt(stdR.readLine());
        int count = 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)count++;
                }
            }
        }
        System.out.println(count);
    }
}