import java.util.*;

public class Main {

    public static void main(String[] args){

        Scanner sc = new Scanner(System.in);
        int n=sc.nextInt(),x=sc.nextInt();
        int[] l = new int[n+1];
        int[] d = new int[n+2];
        for(int i=1;i<n+1;i++)l[i]=sc.nextInt();

        d[1]=0;
        int i;
        for(i=2;i<n+2;i++){
            d[i]=d[i-1]+l[i-1];
            //System.out.println(d[i]);
            if(d[i]>x){
                System.out.println((i-1));
                return;
            }
        }
        System.out.println((n+1));


    }

} import java.util.*; util.* java public class Main {

    public static void main(String[] args){

        Scanner sc = new Scanner(System.in);
        int n=sc.nextInt(),x=sc.nextInt();
        int[] l = new int[n+1];
        int[] d = new int[n+2];
        for(int i=1;i<n+1;i++)l[i]=sc.nextInt();

        d[1]=0;
        int i;
        for(i=2;i<n+2;i++){
            d[i]=d[i-1]+l[i-1];
            //System.out.println(d[i]);
            if(d[i]>x){
                System.out.println((i-1));
                return;
            }
        }
        System.out.println((n+1));


    }

} Main public static void main(String[] args){

        Scanner sc = new Scanner(System.in);
        int n=sc.nextInt(),x=sc.nextInt();
        int[] l = new int[n+1];
        int[] d = new int[n+2];
        for(int i=1;i<n+1;i++)l[i]=sc.nextInt();

        d[1]=0;
        int i;
        for(i=2;i<n+2;i++){
            d[i]=d[i-1]+l[i-1];
            //System.out.println(d[i]);
            if(d[i]>x){
                System.out.println((i-1));
                return;
            }
        }
        System.out.println((n+1));


    } main {

        Scanner sc = new Scanner(System.in);
        int n=sc.nextInt(),x=sc.nextInt();
        int[] l = new int[n+1];
        int[] d = new int[n+2];
        for(int i=1;i<n+1;i++)l[i]=sc.nextInt();

        d[1]=0;
        int i;
        for(i=2;i<n+2;i++){
            d[i]=d[i-1]+l[i-1];
            //System.out.println(d[i]);
            if(d[i]>x){
                System.out.println((i-1));
                return;
            }
        }
        System.out.println((n+1));


    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n=sc.nextInt() n sc.nextInt() sc.nextInt sc x=sc.nextInt(); x sc.nextInt() sc.nextInt sc int[] l = new int[n+1]; l new int[n+1] n+1 n 1 int[] d = new int[n+2]; d new int[n+2] n+2 n 2 for(int i=1;i<n+1;i++)l[i]=sc.nextInt(); int i=1; int i=1; i 1 i<n+1 i n+1 n 1 i++ i++ i l[i]=sc.nextInt(); l[i]=sc.nextInt() l[i] l i sc.nextInt() sc.nextInt sc d[1]=0 d[1] d 1 0 int i; i for(i=2;i<n+2;i++){
            d[i]=d[i-1]+l[i-1];
            //System.out.println(d[i]);
            if(d[i]>x){
                System.out.println((i-1));
                return;
            }
        } i=2; i=2 i 2 i<n+2 i n+2 n 2 i++ i++ i {
            d[i]=d[i-1]+l[i-1];
            //System.out.println(d[i]);
            if(d[i]>x){
                System.out.println((i-1));
                return;
            }
        } {
            d[i]=d[i-1]+l[i-1];
            //System.out.println(d[i]);
            if(d[i]>x){
                System.out.println((i-1));
                return;
            }
        } d[i]=d[i-1]+l[i-1] d[i] d i d[i-1]+l[i-1] d[i-1] d i-1 i 1 l[i-1] l i-1 i 1 if(d[i]>x){
                System.out.println((i-1));
                return;
            } d[i]>x d[i] d i x {
                System.out.println((i-1));
                return;
            } System.out.println((i-1)) System.out.println System.out System System.out (i-1) i 1 return; System.out.println((n+1)) System.out.println System.out System System.out (n+1) n 1 String[] args args public class Main {

    public static void main(String[] args){

        Scanner sc = new Scanner(System.in);
        int n=sc.nextInt(),x=sc.nextInt();
        int[] l = new int[n+1];
        int[] d = new int[n+2];
        for(int i=1;i<n+1;i++)l[i]=sc.nextInt();

        d[1]=0;
        int i;
        for(i=2;i<n+2;i++){
            d[i]=d[i-1]+l[i-1];
            //System.out.println(d[i]);
            if(d[i]>x){
                System.out.println((i-1));
                return;
            }
        }
        System.out.println((n+1));


    }

} public class Main {

    public static void main(String[] args){

        Scanner sc = new Scanner(System.in);
        int n=sc.nextInt(),x=sc.nextInt();
        int[] l = new int[n+1];
        int[] d = new int[n+2];
        for(int i=1;i<n+1;i++)l[i]=sc.nextInt();

        d[1]=0;
        int i;
        for(i=2;i<n+2;i++){
            d[i]=d[i-1]+l[i-1];
            //System.out.println(d[i]);
            if(d[i]>x){
                System.out.println((i-1));
                return;
            }
        }
        System.out.println((n+1));


    }

} Main
import java.util.*;

public class Main {

    public static void main(String[] args){

        Scanner sc = new Scanner(System.in);
        int n=sc.nextInt(),x=sc.nextInt();
        int[] l = new int[n+1];
        int[] d = new int[n+2];
        for(int i=1;i<n+1;i++)l[i]=sc.nextInt();

        d[1]=0;
        int i;
        for(i=2;i<n+2;i++){
            d[i]=d[i-1]+l[i-1];
            //System.out.println(d[i]);
            if(d[i]>x){
                System.out.println((i-1));
                return;
            }
        }
        System.out.println((n+1));


    }

}
