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

public class Main {
    public static void main(String[] args)throws Exception {
        BufferedReader input = new BufferedReader(new InputStreamReader(System.in));
        int a = Integer.parseInt(input.readLine());
        int b = Integer.parseInt(input.readLine());
        int c = Integer.parseInt(input.readLine());
        int target = Integer.parseInt(input.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 ((i * 500)+(j * 100) + (k * 50) == target)
                        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 input = new BufferedReader(new InputStreamReader(System.in));
        int a = Integer.parseInt(input.readLine());
        int b = Integer.parseInt(input.readLine());
        int c = Integer.parseInt(input.readLine());
        int target = Integer.parseInt(input.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 ((i * 500)+(j * 100) + (k * 50) == target)
                        count++;
                }
            }
        }
        System.out.println(count);
    }
} Main public static void main(String[] args)throws Exception {
        BufferedReader input = new BufferedReader(new InputStreamReader(System.in));
        int a = Integer.parseInt(input.readLine());
        int b = Integer.parseInt(input.readLine());
        int c = Integer.parseInt(input.readLine());
        int target = Integer.parseInt(input.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 ((i * 500)+(j * 100) + (k * 50) == target)
                        count++;
                }
            }
        }
        System.out.println(count);
    } main {
        BufferedReader input = new BufferedReader(new InputStreamReader(System.in));
        int a = Integer.parseInt(input.readLine());
        int b = Integer.parseInt(input.readLine());
        int c = Integer.parseInt(input.readLine());
        int target = Integer.parseInt(input.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 ((i * 500)+(j * 100) + (k * 50) == target)
                        count++;
                }
            }
        }
        System.out.println(count);
    } BufferedReader input = new BufferedReader(new InputStreamReader(System.in)); input new BufferedReader(new InputStreamReader(System.in)) int a = Integer.parseInt(input.readLine()); a Integer.parseInt(input.readLine()) Integer.parseInt Integer input.readLine() input.readLine input int b = Integer.parseInt(input.readLine()); b Integer.parseInt(input.readLine()) Integer.parseInt Integer input.readLine() input.readLine input int c = Integer.parseInt(input.readLine()); c Integer.parseInt(input.readLine()) Integer.parseInt Integer input.readLine() input.readLine input int target = Integer.parseInt(input.readLine()); target Integer.parseInt(input.readLine()) Integer.parseInt Integer input.readLine() input.readLine input 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 ((i * 500)+(j * 100) + (k * 50) == target)
                        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 ((i * 500)+(j * 100) + (k * 50) == target)
                        count++;
                }
            }
        } {
            for (int j = 0; j <= b; j++) {
                for (int k = 0; k <= c; k++) {
                    if ((i * 500)+(j * 100) + (k * 50) == target)
                        count++;
                }
            }
        } for (int j = 0; j <= b; j++) {
                for (int k = 0; k <= c; k++) {
                    if ((i * 500)+(j * 100) + (k * 50) == target)
                        count++;
                }
            } int j = 0; int j = 0; j 0 j <= b j b j++ j++ j {
                for (int k = 0; k <= c; k++) {
                    if ((i * 500)+(j * 100) + (k * 50) == target)
                        count++;
                }
            } {
                for (int k = 0; k <= c; k++) {
                    if ((i * 500)+(j * 100) + (k * 50) == target)
                        count++;
                }
            } for (int k = 0; k <= c; k++) {
                    if ((i * 500)+(j * 100) + (k * 50) == target)
                        count++;
                } int k = 0; int k = 0; k 0 k <= c k c k++ k++ k {
                    if ((i * 500)+(j * 100) + (k * 50) == target)
                        count++;
                } {
                    if ((i * 500)+(j * 100) + (k * 50) == target)
                        count++;
                } if ((i * 500)+(j * 100) + (k * 50) == target)
                        count++; (i * 500)+(j * 100) + (k * 50) == target (i * 500)+(j * 100) + (k * 50) (i * 500)+(j * 100) + (k * 50) (i * 500) i 500 (j * 100) j 100 (k * 50) k 50 target 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 input = new BufferedReader(new InputStreamReader(System.in));
        int a = Integer.parseInt(input.readLine());
        int b = Integer.parseInt(input.readLine());
        int c = Integer.parseInt(input.readLine());
        int target = Integer.parseInt(input.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 ((i * 500)+(j * 100) + (k * 50) == target)
                        count++;
                }
            }
        }
        System.out.println(count);
    }
} public class Main {
    public static void main(String[] args)throws Exception {
        BufferedReader input = new BufferedReader(new InputStreamReader(System.in));
        int a = Integer.parseInt(input.readLine());
        int b = Integer.parseInt(input.readLine());
        int c = Integer.parseInt(input.readLine());
        int target = Integer.parseInt(input.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 ((i * 500)+(j * 100) + (k * 50) == target)
                        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 input = new BufferedReader(new InputStreamReader(System.in));
        int a = Integer.parseInt(input.readLine());
        int b = Integer.parseInt(input.readLine());
        int c = Integer.parseInt(input.readLine());
        int target = Integer.parseInt(input.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 ((i * 500)+(j * 100) + (k * 50) == target)
                        count++;
                }
            }
        }
        System.out.println(count);
    }
}
