import java.util.Scanner;
public class Main{
    public static void main(String[] args) {
        // TODO code application logic here
        Scanner sc=new Scanner(System.in);
        int a=sc.nextInt();
        int b=sc.nextInt();
        int count=1;
        int sum=0;
        int[] c=new int[a];
        for(int i=0; i<a;i++){
            c[i]=sc.nextInt();
            sum+=c[i];
            if(sum<=b){
                count++;
            }
        }
        System.out.println(count);   
    }
} import java.util.Scanner; Scanner java.util public class Main{
    public static void main(String[] args) {
        // TODO code application logic here
        Scanner sc=new Scanner(System.in);
        int a=sc.nextInt();
        int b=sc.nextInt();
        int count=1;
        int sum=0;
        int[] c=new int[a];
        for(int i=0; i<a;i++){
            c[i]=sc.nextInt();
            sum+=c[i];
            if(sum<=b){
                count++;
            }
        }
        System.out.println(count);   
    }
} Main public static void main(String[] args) {
        // TODO code application logic here
        Scanner sc=new Scanner(System.in);
        int a=sc.nextInt();
        int b=sc.nextInt();
        int count=1;
        int sum=0;
        int[] c=new int[a];
        for(int i=0; i<a;i++){
            c[i]=sc.nextInt();
            sum+=c[i];
            if(sum<=b){
                count++;
            }
        }
        System.out.println(count);   
    } main {
        // TODO code application logic here
        Scanner sc=new Scanner(System.in);
        int a=sc.nextInt();
        int b=sc.nextInt();
        int count=1;
        int sum=0;
        int[] c=new int[a];
        for(int i=0; i<a;i++){
            c[i]=sc.nextInt();
            sum+=c[i];
            if(sum<=b){
                count++;
            }
        }
        System.out.println(count);   
    } Scanner sc=new Scanner(System.in); sc new Scanner(System.in) int a=sc.nextInt(); a sc.nextInt() sc.nextInt sc int b=sc.nextInt(); b sc.nextInt() sc.nextInt sc int count=1; count 1 int sum=0; sum 0 int[] c=new int[a]; c new int[a] a for(int i=0; i<a;i++){
            c[i]=sc.nextInt();
            sum+=c[i];
            if(sum<=b){
                count++;
            }
        } int i=0; int i=0; i 0 i<a i a i++ i++ i {
            c[i]=sc.nextInt();
            sum+=c[i];
            if(sum<=b){
                count++;
            }
        } {
            c[i]=sc.nextInt();
            sum+=c[i];
            if(sum<=b){
                count++;
            }
        } c[i]=sc.nextInt() c[i] c i sc.nextInt() sc.nextInt sc sum+=c[i] sum c[i] c i if(sum<=b){
                count++;
            } sum<=b sum b {
                count++;
            } 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) {
        // TODO code application logic here
        Scanner sc=new Scanner(System.in);
        int a=sc.nextInt();
        int b=sc.nextInt();
        int count=1;
        int sum=0;
        int[] c=new int[a];
        for(int i=0; i<a;i++){
            c[i]=sc.nextInt();
            sum+=c[i];
            if(sum<=b){
                count++;
            }
        }
        System.out.println(count);   
    }
} public class Main{
    public static void main(String[] args) {
        // TODO code application logic here
        Scanner sc=new Scanner(System.in);
        int a=sc.nextInt();
        int b=sc.nextInt();
        int count=1;
        int sum=0;
        int[] c=new int[a];
        for(int i=0; i<a;i++){
            c[i]=sc.nextInt();
            sum+=c[i];
            if(sum<=b){
                count++;
            }
        }
        System.out.println(count);   
    }
} Main
import java.util.Scanner;
public class Main{
    public static void main(String[] args) {
        // TODO code application logic here
        Scanner sc=new Scanner(System.in);
        int a=sc.nextInt();
        int b=sc.nextInt();
        int count=1;
        int sum=0;
        int[] c=new int[a];
        for(int i=0; i<a;i++){
            c[i]=sc.nextInt();
            sum+=c[i];
            if(sum<=b){
                count++;
            }
        }
        System.out.println(count);   
    }
}
