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

public class Main {
    public static void main(String[] args) {
        BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(System.in));
        int aCount = 0; //0 ~ 50
        int bCount = 0 ; //0 ~ 50
        int cCount = 0; //0 ~ 50
        int x = 0; //50 <= x <= 20,000 && x % 50 == 0
        int answer = 0;

        try {
            aCount = Integer.parseInt(bufferedReader.readLine());
            bCount = Integer.parseInt(bufferedReader.readLine());
            cCount = Integer.parseInt(bufferedReader.readLine());
            x = Integer.parseInt(bufferedReader.readLine());
        } catch (IOException e) {
            e.printStackTrace();
        }

        for (int i = 0; i < aCount + 1; i++) {
            for (int j = 0; j < bCount + 1; j++) {
                for (int k = 0; k < cCount + 1; k++) {
                    int total = 500 * i + 100 * j + 50 * k;
                    if (total == x) {
                        answer++;
                    }
                }
            }
        }

        System.out.println(answer);
    }
} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io public class Main {
    public static void main(String[] args) {
        BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(System.in));
        int aCount = 0; //0 ~ 50
        int bCount = 0 ; //0 ~ 50
        int cCount = 0; //0 ~ 50
        int x = 0; //50 <= x <= 20,000 && x % 50 == 0
        int answer = 0;

        try {
            aCount = Integer.parseInt(bufferedReader.readLine());
            bCount = Integer.parseInt(bufferedReader.readLine());
            cCount = Integer.parseInt(bufferedReader.readLine());
            x = Integer.parseInt(bufferedReader.readLine());
        } catch (IOException e) {
            e.printStackTrace();
        }

        for (int i = 0; i < aCount + 1; i++) {
            for (int j = 0; j < bCount + 1; j++) {
                for (int k = 0; k < cCount + 1; k++) {
                    int total = 500 * i + 100 * j + 50 * k;
                    if (total == x) {
                        answer++;
                    }
                }
            }
        }

        System.out.println(answer);
    }
} Main public static void main(String[] args) {
        BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(System.in));
        int aCount = 0; //0 ~ 50
        int bCount = 0 ; //0 ~ 50
        int cCount = 0; //0 ~ 50
        int x = 0; //50 <= x <= 20,000 && x % 50 == 0
        int answer = 0;

        try {
            aCount = Integer.parseInt(bufferedReader.readLine());
            bCount = Integer.parseInt(bufferedReader.readLine());
            cCount = Integer.parseInt(bufferedReader.readLine());
            x = Integer.parseInt(bufferedReader.readLine());
        } catch (IOException e) {
            e.printStackTrace();
        }

        for (int i = 0; i < aCount + 1; i++) {
            for (int j = 0; j < bCount + 1; j++) {
                for (int k = 0; k < cCount + 1; k++) {
                    int total = 500 * i + 100 * j + 50 * k;
                    if (total == x) {
                        answer++;
                    }
                }
            }
        }

        System.out.println(answer);
    } main {
        BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(System.in));
        int aCount = 0; //0 ~ 50
        int bCount = 0 ; //0 ~ 50
        int cCount = 0; //0 ~ 50
        int x = 0; //50 <= x <= 20,000 && x % 50 == 0
        int answer = 0;

        try {
            aCount = Integer.parseInt(bufferedReader.readLine());
            bCount = Integer.parseInt(bufferedReader.readLine());
            cCount = Integer.parseInt(bufferedReader.readLine());
            x = Integer.parseInt(bufferedReader.readLine());
        } catch (IOException e) {
            e.printStackTrace();
        }

        for (int i = 0; i < aCount + 1; i++) {
            for (int j = 0; j < bCount + 1; j++) {
                for (int k = 0; k < cCount + 1; k++) {
                    int total = 500 * i + 100 * j + 50 * k;
                    if (total == x) {
                        answer++;
                    }
                }
            }
        }

        System.out.println(answer);
    } BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(System.in)); bufferedReader new BufferedReader(new InputStreamReader(System.in)) int aCount = 0; aCount 0 int bCount = 0 ; bCount 0 int cCount = 0; cCount 0 int x = 0; x 0 int answer = 0; answer 0 try {
            aCount = Integer.parseInt(bufferedReader.readLine());
            bCount = Integer.parseInt(bufferedReader.readLine());
            cCount = Integer.parseInt(bufferedReader.readLine());
            x = Integer.parseInt(bufferedReader.readLine());
        } catch (IOException e) {
            e.printStackTrace();
        } catch (IOException e) {
            e.printStackTrace();
        } IOException e {
            e.printStackTrace();
        } e.printStackTrace() e.printStackTrace e {
            aCount = Integer.parseInt(bufferedReader.readLine());
            bCount = Integer.parseInt(bufferedReader.readLine());
            cCount = Integer.parseInt(bufferedReader.readLine());
            x = Integer.parseInt(bufferedReader.readLine());
        } aCount = Integer.parseInt(bufferedReader.readLine()) aCount Integer.parseInt(bufferedReader.readLine()) Integer.parseInt Integer bufferedReader.readLine() bufferedReader.readLine bufferedReader bCount = Integer.parseInt(bufferedReader.readLine()) bCount Integer.parseInt(bufferedReader.readLine()) Integer.parseInt Integer bufferedReader.readLine() bufferedReader.readLine bufferedReader cCount = Integer.parseInt(bufferedReader.readLine()) cCount Integer.parseInt(bufferedReader.readLine()) Integer.parseInt Integer bufferedReader.readLine() bufferedReader.readLine bufferedReader x = Integer.parseInt(bufferedReader.readLine()) x Integer.parseInt(bufferedReader.readLine()) Integer.parseInt Integer bufferedReader.readLine() bufferedReader.readLine bufferedReader for (int i = 0; i < aCount + 1; i++) {
            for (int j = 0; j < bCount + 1; j++) {
                for (int k = 0; k < cCount + 1; k++) {
                    int total = 500 * i + 100 * j + 50 * k;
                    if (total == x) {
                        answer++;
                    }
                }
            }
        } int i = 0; int i = 0; i 0 i < aCount + 1 i aCount + 1 aCount 1 i++ i++ i {
            for (int j = 0; j < bCount + 1; j++) {
                for (int k = 0; k < cCount + 1; k++) {
                    int total = 500 * i + 100 * j + 50 * k;
                    if (total == x) {
                        answer++;
                    }
                }
            }
        } {
            for (int j = 0; j < bCount + 1; j++) {
                for (int k = 0; k < cCount + 1; k++) {
                    int total = 500 * i + 100 * j + 50 * k;
                    if (total == x) {
                        answer++;
                    }
                }
            }
        } for (int j = 0; j < bCount + 1; j++) {
                for (int k = 0; k < cCount + 1; k++) {
                    int total = 500 * i + 100 * j + 50 * k;
                    if (total == x) {
                        answer++;
                    }
                }
            } int j = 0; int j = 0; j 0 j < bCount + 1 j bCount + 1 bCount 1 j++ j++ j {
                for (int k = 0; k < cCount + 1; k++) {
                    int total = 500 * i + 100 * j + 50 * k;
                    if (total == x) {
                        answer++;
                    }
                }
            } {
                for (int k = 0; k < cCount + 1; k++) {
                    int total = 500 * i + 100 * j + 50 * k;
                    if (total == x) {
                        answer++;
                    }
                }
            } for (int k = 0; k < cCount + 1; k++) {
                    int total = 500 * i + 100 * j + 50 * k;
                    if (total == x) {
                        answer++;
                    }
                } int k = 0; int k = 0; k 0 k < cCount + 1 k cCount + 1 cCount 1 k++ k++ k {
                    int total = 500 * i + 100 * j + 50 * k;
                    if (total == x) {
                        answer++;
                    }
                } {
                    int total = 500 * i + 100 * j + 50 * k;
                    if (total == x) {
                        answer++;
                    }
                } int total = 500 * i + 100 * j + 50 * k; total 500 * i + 100 * j + 50 * k 500 * i + 100 * j + 50 * k 500 * i 500 i 100 * j 100 j 50 * k 50 k if (total == x) {
                        answer++;
                    } total == x total x {
                        answer++;
                    } answer++ answer System.out.println(answer) System.out.println System.out System System.out answer String[] args args public class Main {
    public static void main(String[] args) {
        BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(System.in));
        int aCount = 0; //0 ~ 50
        int bCount = 0 ; //0 ~ 50
        int cCount = 0; //0 ~ 50
        int x = 0; //50 <= x <= 20,000 && x % 50 == 0
        int answer = 0;

        try {
            aCount = Integer.parseInt(bufferedReader.readLine());
            bCount = Integer.parseInt(bufferedReader.readLine());
            cCount = Integer.parseInt(bufferedReader.readLine());
            x = Integer.parseInt(bufferedReader.readLine());
        } catch (IOException e) {
            e.printStackTrace();
        }

        for (int i = 0; i < aCount + 1; i++) {
            for (int j = 0; j < bCount + 1; j++) {
                for (int k = 0; k < cCount + 1; k++) {
                    int total = 500 * i + 100 * j + 50 * k;
                    if (total == x) {
                        answer++;
                    }
                }
            }
        }

        System.out.println(answer);
    }
} public class Main {
    public static void main(String[] args) {
        BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(System.in));
        int aCount = 0; //0 ~ 50
        int bCount = 0 ; //0 ~ 50
        int cCount = 0; //0 ~ 50
        int x = 0; //50 <= x <= 20,000 && x % 50 == 0
        int answer = 0;

        try {
            aCount = Integer.parseInt(bufferedReader.readLine());
            bCount = Integer.parseInt(bufferedReader.readLine());
            cCount = Integer.parseInt(bufferedReader.readLine());
            x = Integer.parseInt(bufferedReader.readLine());
        } catch (IOException e) {
            e.printStackTrace();
        }

        for (int i = 0; i < aCount + 1; i++) {
            for (int j = 0; j < bCount + 1; j++) {
                for (int k = 0; k < cCount + 1; k++) {
                    int total = 500 * i + 100 * j + 50 * k;
                    if (total == x) {
                        answer++;
                    }
                }
            }
        }

        System.out.println(answer);
    }
} Main
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {
    public static void main(String[] args) {
        BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(System.in));
        int aCount = 0; //0 ~ 50
        int bCount = 0 ; //0 ~ 50
        int cCount = 0; //0 ~ 50
        int x = 0; //50 <= x <= 20,000 && x % 50 == 0
        int answer = 0;

        try {
            aCount = Integer.parseInt(bufferedReader.readLine());
            bCount = Integer.parseInt(bufferedReader.readLine());
            cCount = Integer.parseInt(bufferedReader.readLine());
            x = Integer.parseInt(bufferedReader.readLine());
        } catch (IOException e) {
            e.printStackTrace();
        }

        for (int i = 0; i < aCount + 1; i++) {
            for (int j = 0; j < bCount + 1; j++) {
                for (int k = 0; k < cCount + 1; k++) {
                    int total = 500 * i + 100 * j + 50 * k;
                    if (total == x) {
                        answer++;
                    }
                }
            }
        }

        System.out.println(answer);
    }
}