import java.util.Scanner;

public class Main{
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int a = Integer.parseInt(sc.next());
        int b = Integer.parseInt(sc.next());
        int c = Integer.parseInt(sc.next());
        int x = Integer.parseInt(sc.next());

        int cnt = 0;
        int sum;
        for(int ia=0;ia<=a;ia++){
            for(int ib=0;ib<=b;ib++){
                for(int ic=0;ic<=c;ic++){
                    sum = ia*500 + ib*100 + ic*50;
                    if(sum==x){cnt++;}
                }
            }
        }
        System.out.println(cnt);
    }
} import java.util.Scanner; Scanner java.util public class Main{
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int a = Integer.parseInt(sc.next());
        int b = Integer.parseInt(sc.next());
        int c = Integer.parseInt(sc.next());
        int x = Integer.parseInt(sc.next());

        int cnt = 0;
        int sum;
        for(int ia=0;ia<=a;ia++){
            for(int ib=0;ib<=b;ib++){
                for(int ic=0;ic<=c;ic++){
                    sum = ia*500 + ib*100 + ic*50;
                    if(sum==x){cnt++;}
                }
            }
        }
        System.out.println(cnt);
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int a = Integer.parseInt(sc.next());
        int b = Integer.parseInt(sc.next());
        int c = Integer.parseInt(sc.next());
        int x = Integer.parseInt(sc.next());

        int cnt = 0;
        int sum;
        for(int ia=0;ia<=a;ia++){
            for(int ib=0;ib<=b;ib++){
                for(int ic=0;ic<=c;ic++){
                    sum = ia*500 + ib*100 + ic*50;
                    if(sum==x){cnt++;}
                }
            }
        }
        System.out.println(cnt);
    } main {
        Scanner sc = new Scanner(System.in);
        int a = Integer.parseInt(sc.next());
        int b = Integer.parseInt(sc.next());
        int c = Integer.parseInt(sc.next());
        int x = Integer.parseInt(sc.next());

        int cnt = 0;
        int sum;
        for(int ia=0;ia<=a;ia++){
            for(int ib=0;ib<=b;ib++){
                for(int ic=0;ic<=c;ic++){
                    sum = ia*500 + ib*100 + ic*50;
                    if(sum==x){cnt++;}
                }
            }
        }
        System.out.println(cnt);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int a = Integer.parseInt(sc.next()); a Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc int b = Integer.parseInt(sc.next()); b Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc int c = Integer.parseInt(sc.next()); c Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc int x = Integer.parseInt(sc.next()); x Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc int cnt = 0; cnt 0 int sum; sum for(int ia=0;ia<=a;ia++){
            for(int ib=0;ib<=b;ib++){
                for(int ic=0;ic<=c;ic++){
                    sum = ia*500 + ib*100 + ic*50;
                    if(sum==x){cnt++;}
                }
            }
        } int ia=0; int ia=0; ia 0 ia<=a ia a ia++ ia++ ia {
            for(int ib=0;ib<=b;ib++){
                for(int ic=0;ic<=c;ic++){
                    sum = ia*500 + ib*100 + ic*50;
                    if(sum==x){cnt++;}
                }
            }
        } {
            for(int ib=0;ib<=b;ib++){
                for(int ic=0;ic<=c;ic++){
                    sum = ia*500 + ib*100 + ic*50;
                    if(sum==x){cnt++;}
                }
            }
        } for(int ib=0;ib<=b;ib++){
                for(int ic=0;ic<=c;ic++){
                    sum = ia*500 + ib*100 + ic*50;
                    if(sum==x){cnt++;}
                }
            } int ib=0; int ib=0; ib 0 ib<=b ib b ib++ ib++ ib {
                for(int ic=0;ic<=c;ic++){
                    sum = ia*500 + ib*100 + ic*50;
                    if(sum==x){cnt++;}
                }
            } {
                for(int ic=0;ic<=c;ic++){
                    sum = ia*500 + ib*100 + ic*50;
                    if(sum==x){cnt++;}
                }
            } for(int ic=0;ic<=c;ic++){
                    sum = ia*500 + ib*100 + ic*50;
                    if(sum==x){cnt++;}
                } int ic=0; int ic=0; ic 0 ic<=c ic c ic++ ic++ ic {
                    sum = ia*500 + ib*100 + ic*50;
                    if(sum==x){cnt++;}
                } {
                    sum = ia*500 + ib*100 + ic*50;
                    if(sum==x){cnt++;}
                } sum = ia*500 + ib*100 + ic*50 sum ia*500 + ib*100 + ic*50 ia*500 + ib*100 + ic*50 ia*500 ia 500 ib*100 ib 100 ic*50 ic 50 if(sum==x){cnt++;} sum==x sum x {cnt++;} cnt++ cnt System.out.println(cnt) System.out.println System.out System System.out cnt String[] args args public class Main{
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int a = Integer.parseInt(sc.next());
        int b = Integer.parseInt(sc.next());
        int c = Integer.parseInt(sc.next());
        int x = Integer.parseInt(sc.next());

        int cnt = 0;
        int sum;
        for(int ia=0;ia<=a;ia++){
            for(int ib=0;ib<=b;ib++){
                for(int ic=0;ic<=c;ic++){
                    sum = ia*500 + ib*100 + ic*50;
                    if(sum==x){cnt++;}
                }
            }
        }
        System.out.println(cnt);
    }
} public class Main{
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int a = Integer.parseInt(sc.next());
        int b = Integer.parseInt(sc.next());
        int c = Integer.parseInt(sc.next());
        int x = Integer.parseInt(sc.next());

        int cnt = 0;
        int sum;
        for(int ia=0;ia<=a;ia++){
            for(int ib=0;ib<=b;ib++){
                for(int ic=0;ic<=c;ic++){
                    sum = ia*500 + ib*100 + ic*50;
                    if(sum==x){cnt++;}
                }
            }
        }
        System.out.println(cnt);
    }
} Main
import java.util.Scanner;

public class Main{
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int a = Integer.parseInt(sc.next());
        int b = Integer.parseInt(sc.next());
        int c = Integer.parseInt(sc.next());
        int x = Integer.parseInt(sc.next());

        int cnt = 0;
        int sum;
        for(int ia=0;ia<=a;ia++){
            for(int ib=0;ib<=b;ib++){
                for(int ic=0;ic<=c;ic++){
                    sum = ia*500 + ib*100 + ic*50;
                    if(sum==x){cnt++;}
                }
            }
        }
        System.out.println(cnt);
    }
}