import java.util.Scanner;

public class Main
{
    public static void main(String[] args)
    {
        int a,b,c,x;
        int output=0;
        int i,j,k;
        int ac,bc,cc;

        Scanner scan = new Scanner(System.in);
        a=scan.nextInt();
        b=scan.nextInt();
        c=scan.nextInt();
        x=scan.nextInt();

        for(i=0;i<=a;i++)
        {   
            for(j=0;j<=b;j++)
            {
                for(k=0;k<=c;k++)
                {
                    ac=500*i;
                    bc=100*j;
                    cc=50*k;
                    if(ac+bc+cc==x)
                    {
                        output++;
                    }

                }
            }
        }
        System.out.println(output);
    } 
} import java.util.Scanner; Scanner java.util public class Main
{
    public static void main(String[] args)
    {
        int a,b,c,x;
        int output=0;
        int i,j,k;
        int ac,bc,cc;

        Scanner scan = new Scanner(System.in);
        a=scan.nextInt();
        b=scan.nextInt();
        c=scan.nextInt();
        x=scan.nextInt();

        for(i=0;i<=a;i++)
        {   
            for(j=0;j<=b;j++)
            {
                for(k=0;k<=c;k++)
                {
                    ac=500*i;
                    bc=100*j;
                    cc=50*k;
                    if(ac+bc+cc==x)
                    {
                        output++;
                    }

                }
            }
        }
        System.out.println(output);
    } 
} Main public static void main(String[] args)
    {
        int a,b,c,x;
        int output=0;
        int i,j,k;
        int ac,bc,cc;

        Scanner scan = new Scanner(System.in);
        a=scan.nextInt();
        b=scan.nextInt();
        c=scan.nextInt();
        x=scan.nextInt();

        for(i=0;i<=a;i++)
        {   
            for(j=0;j<=b;j++)
            {
                for(k=0;k<=c;k++)
                {
                    ac=500*i;
                    bc=100*j;
                    cc=50*k;
                    if(ac+bc+cc==x)
                    {
                        output++;
                    }

                }
            }
        }
        System.out.println(output);
    } main {
        int a,b,c,x;
        int output=0;
        int i,j,k;
        int ac,bc,cc;

        Scanner scan = new Scanner(System.in);
        a=scan.nextInt();
        b=scan.nextInt();
        c=scan.nextInt();
        x=scan.nextInt();

        for(i=0;i<=a;i++)
        {   
            for(j=0;j<=b;j++)
            {
                for(k=0;k<=c;k++)
                {
                    ac=500*i;
                    bc=100*j;
                    cc=50*k;
                    if(ac+bc+cc==x)
                    {
                        output++;
                    }

                }
            }
        }
        System.out.println(output);
    } int a a b b c c x; x int output=0; output 0 int i i j j k; k int ac ac bc bc cc; cc Scanner scan = new Scanner(System.in); scan new Scanner(System.in) a=scan.nextInt() a scan.nextInt() scan.nextInt scan b=scan.nextInt() b scan.nextInt() scan.nextInt scan c=scan.nextInt() c scan.nextInt() scan.nextInt scan x=scan.nextInt() x scan.nextInt() scan.nextInt scan for(i=0;i<=a;i++)
        {   
            for(j=0;j<=b;j++)
            {
                for(k=0;k<=c;k++)
                {
                    ac=500*i;
                    bc=100*j;
                    cc=50*k;
                    if(ac+bc+cc==x)
                    {
                        output++;
                    }

                }
            }
        } i=0; i=0 i 0 i<=a i a i++ i++ i {   
            for(j=0;j<=b;j++)
            {
                for(k=0;k<=c;k++)
                {
                    ac=500*i;
                    bc=100*j;
                    cc=50*k;
                    if(ac+bc+cc==x)
                    {
                        output++;
                    }

                }
            }
        } {   
            for(j=0;j<=b;j++)
            {
                for(k=0;k<=c;k++)
                {
                    ac=500*i;
                    bc=100*j;
                    cc=50*k;
                    if(ac+bc+cc==x)
                    {
                        output++;
                    }

                }
            }
        } for(j=0;j<=b;j++)
            {
                for(k=0;k<=c;k++)
                {
                    ac=500*i;
                    bc=100*j;
                    cc=50*k;
                    if(ac+bc+cc==x)
                    {
                        output++;
                    }

                }
            } j=0; j=0 j 0 j<=b j b j++ j++ j {
                for(k=0;k<=c;k++)
                {
                    ac=500*i;
                    bc=100*j;
                    cc=50*k;
                    if(ac+bc+cc==x)
                    {
                        output++;
                    }

                }
            } {
                for(k=0;k<=c;k++)
                {
                    ac=500*i;
                    bc=100*j;
                    cc=50*k;
                    if(ac+bc+cc==x)
                    {
                        output++;
                    }

                }
            } for(k=0;k<=c;k++)
                {
                    ac=500*i;
                    bc=100*j;
                    cc=50*k;
                    if(ac+bc+cc==x)
                    {
                        output++;
                    }

                } k=0; k=0 k 0 k<=c k c k++ k++ k {
                    ac=500*i;
                    bc=100*j;
                    cc=50*k;
                    if(ac+bc+cc==x)
                    {
                        output++;
                    }

                } {
                    ac=500*i;
                    bc=100*j;
                    cc=50*k;
                    if(ac+bc+cc==x)
                    {
                        output++;
                    }

                } ac=500*i ac 500*i 500 i bc=100*j bc 100*j 100 j cc=50*k cc 50*k 50 k if(ac+bc+cc==x)
                    {
                        output++;
                    } ac+bc+cc==x ac+bc+cc ac+bc+cc ac bc cc x {
                        output++;
                    } output++ output System.out.println(output) System.out.println System.out System System.out output String[] args args public class Main
{
    public static void main(String[] args)
    {
        int a,b,c,x;
        int output=0;
        int i,j,k;
        int ac,bc,cc;

        Scanner scan = new Scanner(System.in);
        a=scan.nextInt();
        b=scan.nextInt();
        c=scan.nextInt();
        x=scan.nextInt();

        for(i=0;i<=a;i++)
        {   
            for(j=0;j<=b;j++)
            {
                for(k=0;k<=c;k++)
                {
                    ac=500*i;
                    bc=100*j;
                    cc=50*k;
                    if(ac+bc+cc==x)
                    {
                        output++;
                    }

                }
            }
        }
        System.out.println(output);
    } 
} public class Main
{
    public static void main(String[] args)
    {
        int a,b,c,x;
        int output=0;
        int i,j,k;
        int ac,bc,cc;

        Scanner scan = new Scanner(System.in);
        a=scan.nextInt();
        b=scan.nextInt();
        c=scan.nextInt();
        x=scan.nextInt();

        for(i=0;i<=a;i++)
        {   
            for(j=0;j<=b;j++)
            {
                for(k=0;k<=c;k++)
                {
                    ac=500*i;
                    bc=100*j;
                    cc=50*k;
                    if(ac+bc+cc==x)
                    {
                        output++;
                    }

                }
            }
        }
        System.out.println(output);
    } 
} Main
import java.util.Scanner;

public class Main
{
    public static void main(String[] args)
    {
        int a,b,c,x;
        int output=0;
        int i,j,k;
        int ac,bc,cc;

        Scanner scan = new Scanner(System.in);
        a=scan.nextInt();
        b=scan.nextInt();
        c=scan.nextInt();
        x=scan.nextInt();

        for(i=0;i<=a;i++)
        {   
            for(j=0;j<=b;j++)
            {
                for(k=0;k<=c;k++)
                {
                    ac=500*i;
                    bc=100*j;
                    cc=50*k;
                    if(ac+bc+cc==x)
                    {
                        output++;
                    }

                }
            }
        }
        System.out.println(output);
    } 
}