import java.util.*;

class Main {
    public static void main(String[] args) {
        Scanner stdin = new Scanner(System.in);

        int c500 = stdin.nextInt();
        int c100 = stdin.nextInt();
        int c50 = stdin.nextInt();
        int cSum = stdin.nextInt();

        int count = 0;

        for (int i = 0; i <= c500; i++) {
            for (int j = 0; j <= c100; j++) {
                for (int k = 0; k <= c50; k++) {
                    if (i * 500 + j * 100 + k * 50 == cSum) {
                        count++;
                    }
                }
            }
        }

        System.out.println(count);
    }
} import java.util.*; util.* java class Main {
    public static void main(String[] args) {
        Scanner stdin = new Scanner(System.in);

        int c500 = stdin.nextInt();
        int c100 = stdin.nextInt();
        int c50 = stdin.nextInt();
        int cSum = stdin.nextInt();

        int count = 0;

        for (int i = 0; i <= c500; i++) {
            for (int j = 0; j <= c100; j++) {
                for (int k = 0; k <= c50; k++) {
                    if (i * 500 + j * 100 + k * 50 == cSum) {
                        count++;
                    }
                }
            }
        }

        System.out.println(count);
    }
} Main public static void main(String[] args) {
        Scanner stdin = new Scanner(System.in);

        int c500 = stdin.nextInt();
        int c100 = stdin.nextInt();
        int c50 = stdin.nextInt();
        int cSum = stdin.nextInt();

        int count = 0;

        for (int i = 0; i <= c500; i++) {
            for (int j = 0; j <= c100; j++) {
                for (int k = 0; k <= c50; k++) {
                    if (i * 500 + j * 100 + k * 50 == cSum) {
                        count++;
                    }
                }
            }
        }

        System.out.println(count);
    } main {
        Scanner stdin = new Scanner(System.in);

        int c500 = stdin.nextInt();
        int c100 = stdin.nextInt();
        int c50 = stdin.nextInt();
        int cSum = stdin.nextInt();

        int count = 0;

        for (int i = 0; i <= c500; i++) {
            for (int j = 0; j <= c100; j++) {
                for (int k = 0; k <= c50; k++) {
                    if (i * 500 + j * 100 + k * 50 == cSum) {
                        count++;
                    }
                }
            }
        }

        System.out.println(count);
    } Scanner stdin = new Scanner(System.in); stdin new Scanner(System.in) int c500 = stdin.nextInt(); c500 stdin.nextInt() stdin.nextInt stdin int c100 = stdin.nextInt(); c100 stdin.nextInt() stdin.nextInt stdin int c50 = stdin.nextInt(); c50 stdin.nextInt() stdin.nextInt stdin int cSum = stdin.nextInt(); cSum stdin.nextInt() stdin.nextInt stdin int count = 0; count 0 for (int i = 0; i <= c500; i++) {
            for (int j = 0; j <= c100; j++) {
                for (int k = 0; k <= c50; k++) {
                    if (i * 500 + j * 100 + k * 50 == cSum) {
                        count++;
                    }
                }
            }
        } int i = 0; int i = 0; i 0 i <= c500 i c500 i++ i++ i {
            for (int j = 0; j <= c100; j++) {
                for (int k = 0; k <= c50; k++) {
                    if (i * 500 + j * 100 + k * 50 == cSum) {
                        count++;
                    }
                }
            }
        } {
            for (int j = 0; j <= c100; j++) {
                for (int k = 0; k <= c50; k++) {
                    if (i * 500 + j * 100 + k * 50 == cSum) {
                        count++;
                    }
                }
            }
        } for (int j = 0; j <= c100; j++) {
                for (int k = 0; k <= c50; k++) {
                    if (i * 500 + j * 100 + k * 50 == cSum) {
                        count++;
                    }
                }
            } int j = 0; int j = 0; j 0 j <= c100 j c100 j++ j++ j {
                for (int k = 0; k <= c50; k++) {
                    if (i * 500 + j * 100 + k * 50 == cSum) {
                        count++;
                    }
                }
            } {
                for (int k = 0; k <= c50; k++) {
                    if (i * 500 + j * 100 + k * 50 == cSum) {
                        count++;
                    }
                }
            } for (int k = 0; k <= c50; k++) {
                    if (i * 500 + j * 100 + k * 50 == cSum) {
                        count++;
                    }
                } int k = 0; int k = 0; k 0 k <= c50 k c50 k++ k++ k {
                    if (i * 500 + j * 100 + k * 50 == cSum) {
                        count++;
                    }
                } {
                    if (i * 500 + j * 100 + k * 50 == cSum) {
                        count++;
                    }
                } if (i * 500 + j * 100 + k * 50 == cSum) {
                        count++;
                    } i * 500 + j * 100 + k * 50 == cSum i * 500 + j * 100 + k * 50 i * 500 + j * 100 + k * 50 i * 500 i 500 j * 100 j 100 k * 50 k 50 cSum {
                        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 stdin = new Scanner(System.in);

        int c500 = stdin.nextInt();
        int c100 = stdin.nextInt();
        int c50 = stdin.nextInt();
        int cSum = stdin.nextInt();

        int count = 0;

        for (int i = 0; i <= c500; i++) {
            for (int j = 0; j <= c100; j++) {
                for (int k = 0; k <= c50; k++) {
                    if (i * 500 + j * 100 + k * 50 == cSum) {
                        count++;
                    }
                }
            }
        }

        System.out.println(count);
    }
}
