import java.io.*;
import java.util.*;
public class Main
{
    public static void main(String argv[])
    {
        int N,K,i;
        try
        {
            BufferedReader bf=new BufferedReader(new InputStreamReader(System.in));
            String[] nk=bf.readLine().split(" ");
            N=Integer.parseInt(nk[0]);
            K=Integer.parseInt(nk[1]);
            String[] da=bf.readLine().split(" ");

            System.out.println(solve(da,K));

        }
        catch(IOException e)
        {
            System.out.println(e);
            System.exit(0);
        }
    }
    private static int solve(String[] d,int X)
    {
        int c=0,i;
        for(i=0;i<d.length;i++)
        {
            c+=Integer.parseInt(d[i]);
            if(c>X)
                break;
        }
        return 1+i;
    }
} import java.io.*; io.* java import java.util.*; util.* java public class Main
{
    public static void main(String argv[])
    {
        int N,K,i;
        try
        {
            BufferedReader bf=new BufferedReader(new InputStreamReader(System.in));
            String[] nk=bf.readLine().split(" ");
            N=Integer.parseInt(nk[0]);
            K=Integer.parseInt(nk[1]);
            String[] da=bf.readLine().split(" ");

            System.out.println(solve(da,K));

        }
        catch(IOException e)
        {
            System.out.println(e);
            System.exit(0);
        }
    }
    private static int solve(String[] d,int X)
    {
        int c=0,i;
        for(i=0;i<d.length;i++)
        {
            c+=Integer.parseInt(d[i]);
            if(c>X)
                break;
        }
        return 1+i;
    }
} Main public static void main(String argv[])
    {
        int N,K,i;
        try
        {
            BufferedReader bf=new BufferedReader(new InputStreamReader(System.in));
            String[] nk=bf.readLine().split(" ");
            N=Integer.parseInt(nk[0]);
            K=Integer.parseInt(nk[1]);
            String[] da=bf.readLine().split(" ");

            System.out.println(solve(da,K));

        }
        catch(IOException e)
        {
            System.out.println(e);
            System.exit(0);
        }
    } main {
        int N,K,i;
        try
        {
            BufferedReader bf=new BufferedReader(new InputStreamReader(System.in));
            String[] nk=bf.readLine().split(" ");
            N=Integer.parseInt(nk[0]);
            K=Integer.parseInt(nk[1]);
            String[] da=bf.readLine().split(" ");

            System.out.println(solve(da,K));

        }
        catch(IOException e)
        {
            System.out.println(e);
            System.exit(0);
        }
    } int N N K K i; i try
        {
            BufferedReader bf=new BufferedReader(new InputStreamReader(System.in));
            String[] nk=bf.readLine().split(" ");
            N=Integer.parseInt(nk[0]);
            K=Integer.parseInt(nk[1]);
            String[] da=bf.readLine().split(" ");

            System.out.println(solve(da,K));

        }
        catch(IOException e)
        {
            System.out.println(e);
            System.exit(0);
        } catch(IOException e)
        {
            System.out.println(e);
            System.exit(0);
        } IOException e {
            System.out.println(e);
            System.exit(0);
        } System.out.println(e) System.out.println System.out System System.out e System.exit(0) System.exit System 0 {
            BufferedReader bf=new BufferedReader(new InputStreamReader(System.in));
            String[] nk=bf.readLine().split(" ");
            N=Integer.parseInt(nk[0]);
            K=Integer.parseInt(nk[1]);
            String[] da=bf.readLine().split(" ");

            System.out.println(solve(da,K));

        } BufferedReader bf=new BufferedReader(new InputStreamReader(System.in)); bf new BufferedReader(new InputStreamReader(System.in)) String[] nk=bf.readLine().split(" "); nk bf.readLine().split(" ") bf.readLine().split bf.readLine() bf.readLine bf " " N=Integer.parseInt(nk[0]) N Integer.parseInt(nk[0]) Integer.parseInt Integer nk[0] nk 0 K=Integer.parseInt(nk[1]) K Integer.parseInt(nk[1]) Integer.parseInt Integer nk[1] nk 1 String[] da=bf.readLine().split(" "); da bf.readLine().split(" ") bf.readLine().split bf.readLine() bf.readLine bf " " System.out.println(solve(da,K)) System.out.println System.out System System.out solve(da,K) solve da K String argv[] argv private static int solve(String[] d,int X)
    {
        int c=0,i;
        for(i=0;i<d.length;i++)
        {
            c+=Integer.parseInt(d[i]);
            if(c>X)
                break;
        }
        return 1+i;
    } solve {
        int c=0,i;
        for(i=0;i<d.length;i++)
        {
            c+=Integer.parseInt(d[i]);
            if(c>X)
                break;
        }
        return 1+i;
    } int c=0 c 0 i; i for(i=0;i<d.length;i++)
        {
            c+=Integer.parseInt(d[i]);
            if(c>X)
                break;
        } i=0; i=0 i 0 i<d.length i d.length d d.length i++ i++ i {
            c+=Integer.parseInt(d[i]);
            if(c>X)
                break;
        } {
            c+=Integer.parseInt(d[i]);
            if(c>X)
                break;
        } c+=Integer.parseInt(d[i]) c Integer.parseInt(d[i]) Integer.parseInt Integer d[i] d i if(c>X)
                break; c>X c X break; return 1+i; 1+i 1 i String[] d d int X X public class Main
{
    public static void main(String argv[])
    {
        int N,K,i;
        try
        {
            BufferedReader bf=new BufferedReader(new InputStreamReader(System.in));
            String[] nk=bf.readLine().split(" ");
            N=Integer.parseInt(nk[0]);
            K=Integer.parseInt(nk[1]);
            String[] da=bf.readLine().split(" ");

            System.out.println(solve(da,K));

        }
        catch(IOException e)
        {
            System.out.println(e);
            System.exit(0);
        }
    }
    private static int solve(String[] d,int X)
    {
        int c=0,i;
        for(i=0;i<d.length;i++)
        {
            c+=Integer.parseInt(d[i]);
            if(c>X)
                break;
        }
        return 1+i;
    }
} public class Main
{
    public static void main(String argv[])
    {
        int N,K,i;
        try
        {
            BufferedReader bf=new BufferedReader(new InputStreamReader(System.in));
            String[] nk=bf.readLine().split(" ");
            N=Integer.parseInt(nk[0]);
            K=Integer.parseInt(nk[1]);
            String[] da=bf.readLine().split(" ");

            System.out.println(solve(da,K));

        }
        catch(IOException e)
        {
            System.out.println(e);
            System.exit(0);
        }
    }
    private static int solve(String[] d,int X)
    {
        int c=0,i;
        for(i=0;i<d.length;i++)
        {
            c+=Integer.parseInt(d[i]);
            if(c>X)
                break;
        }
        return 1+i;
    }
} Main
import java.io.*;
import java.util.*;
public class Main
{
    public static void main(String argv[])
    {
        int N,K,i;
        try
        {
            BufferedReader bf=new BufferedReader(new InputStreamReader(System.in));
            String[] nk=bf.readLine().split(" ");
            N=Integer.parseInt(nk[0]);
            K=Integer.parseInt(nk[1]);
            String[] da=bf.readLine().split(" ");

            System.out.println(solve(da,K));

        }
        catch(IOException e)
        {
            System.out.println(e);
            System.exit(0);
        }
    }
    private static int solve(String[] d,int X)
    {
        int c=0,i;
        for(i=0;i<d.length;i++)
        {
            c+=Integer.parseInt(d[i]);
            if(c>X)
                break;
        }
        return 1+i;
    }
}
