import java.util.*;
public class Main{
	public static void main(String arg[]){
		Scanner sc=new Scanner(System.in);
		int a=sc.nextInt();
		int b=sc.nextInt();
		int arr[]=new int[a];
		int count=0,c=1;
		for(int i=0;i<a;i++)
			arr[i]=sc.nextInt();
		for(int i=0;i<a;i++){
			count+=arr[i];
			if(count<=b)
				c++;
		}
		System.out.println(c);
	}
} import java.util.*; util.* java public class Main{
	public static void main(String arg[]){
		Scanner sc=new Scanner(System.in);
		int a=sc.nextInt();
		int b=sc.nextInt();
		int arr[]=new int[a];
		int count=0,c=1;
		for(int i=0;i<a;i++)
			arr[i]=sc.nextInt();
		for(int i=0;i<a;i++){
			count+=arr[i];
			if(count<=b)
				c++;
		}
		System.out.println(c);
	}
} Main public static void main(String arg[]){
		Scanner sc=new Scanner(System.in);
		int a=sc.nextInt();
		int b=sc.nextInt();
		int arr[]=new int[a];
		int count=0,c=1;
		for(int i=0;i<a;i++)
			arr[i]=sc.nextInt();
		for(int i=0;i<a;i++){
			count+=arr[i];
			if(count<=b)
				c++;
		}
		System.out.println(c);
	} main {
		Scanner sc=new Scanner(System.in);
		int a=sc.nextInt();
		int b=sc.nextInt();
		int arr[]=new int[a];
		int count=0,c=1;
		for(int i=0;i<a;i++)
			arr[i]=sc.nextInt();
		for(int i=0;i<a;i++){
			count+=arr[i];
			if(count<=b)
				c++;
		}
		System.out.println(c);
	} 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 arr[]=new int[a]; arr new int[a] a int count=0 count 0 c=1; c 1 for(int i=0;i<a;i++)
			arr[i]=sc.nextInt(); int i=0; int i=0; i 0 i<a i a i++ i++ i arr[i]=sc.nextInt(); arr[i]=sc.nextInt() arr[i] arr i sc.nextInt() sc.nextInt sc for(int i=0;i<a;i++){
			count+=arr[i];
			if(count<=b)
				c++;
		} int i=0; int i=0; i 0 i<a i a i++ i++ i {
			count+=arr[i];
			if(count<=b)
				c++;
		} {
			count+=arr[i];
			if(count<=b)
				c++;
		} count+=arr[i] count arr[i] arr i if(count<=b)
				c++; count<=b count b c++ c System.out.println(c) System.out.println System.out System System.out c String arg[] arg public class Main{
	public static void main(String arg[]){
		Scanner sc=new Scanner(System.in);
		int a=sc.nextInt();
		int b=sc.nextInt();
		int arr[]=new int[a];
		int count=0,c=1;
		for(int i=0;i<a;i++)
			arr[i]=sc.nextInt();
		for(int i=0;i<a;i++){
			count+=arr[i];
			if(count<=b)
				c++;
		}
		System.out.println(c);
	}
} public class Main{
	public static void main(String arg[]){
		Scanner sc=new Scanner(System.in);
		int a=sc.nextInt();
		int b=sc.nextInt();
		int arr[]=new int[a];
		int count=0,c=1;
		for(int i=0;i<a;i++)
			arr[i]=sc.nextInt();
		for(int i=0;i<a;i++){
			count+=arr[i];
			if(count<=b)
				c++;
		}
		System.out.println(c);
	}
} Main
import java.util.*;
public class Main{
	public static void main(String arg[]){
		Scanner sc=new Scanner(System.in);
		int a=sc.nextInt();
		int b=sc.nextInt();
		int arr[]=new int[a];
		int count=0,c=1;
		for(int i=0;i<a;i++)
			arr[i]=sc.nextInt();
		for(int i=0;i<a;i++){
			count+=arr[i];
			if(count<=b)
				c++;
		}
		System.out.println(c);
	}
}