import java.util.Scanner;

public class Main {
	 public static void main(String args[]){
		 Scanner std = new Scanner(System.in);
		 int n = std.nextInt();
		 int x = std.nextInt();
		 int[] l = new int[n];
		 for(int i=0;i<n;i++) {
			 l[i] = std.nextInt();
		 }
		 int d=0;
		 int a=0;
		 for(int i=0;i<n;i++) {
			 d+=l[i];
			 if(d>x) {
				 System.out.println(i+1);
				 a = 1;
				 break;
			 }
		 }
		 if (a==0) {
			 System.out.println(n+1);
		 }
	 }
} import java.util.Scanner; Scanner java.util public class Main {
	 public static void main(String args[]){
		 Scanner std = new Scanner(System.in);
		 int n = std.nextInt();
		 int x = std.nextInt();
		 int[] l = new int[n];
		 for(int i=0;i<n;i++) {
			 l[i] = std.nextInt();
		 }
		 int d=0;
		 int a=0;
		 for(int i=0;i<n;i++) {
			 d+=l[i];
			 if(d>x) {
				 System.out.println(i+1);
				 a = 1;
				 break;
			 }
		 }
		 if (a==0) {
			 System.out.println(n+1);
		 }
	 }
} Main public static void main(String args[]){
		 Scanner std = new Scanner(System.in);
		 int n = std.nextInt();
		 int x = std.nextInt();
		 int[] l = new int[n];
		 for(int i=0;i<n;i++) {
			 l[i] = std.nextInt();
		 }
		 int d=0;
		 int a=0;
		 for(int i=0;i<n;i++) {
			 d+=l[i];
			 if(d>x) {
				 System.out.println(i+1);
				 a = 1;
				 break;
			 }
		 }
		 if (a==0) {
			 System.out.println(n+1);
		 }
	 } main {
		 Scanner std = new Scanner(System.in);
		 int n = std.nextInt();
		 int x = std.nextInt();
		 int[] l = new int[n];
		 for(int i=0;i<n;i++) {
			 l[i] = std.nextInt();
		 }
		 int d=0;
		 int a=0;
		 for(int i=0;i<n;i++) {
			 d+=l[i];
			 if(d>x) {
				 System.out.println(i+1);
				 a = 1;
				 break;
			 }
		 }
		 if (a==0) {
			 System.out.println(n+1);
		 }
	 } Scanner std = new Scanner(System.in); std new Scanner(System.in) int n = std.nextInt(); n std.nextInt() std.nextInt std int x = std.nextInt(); x std.nextInt() std.nextInt std int[] l = new int[n]; l new int[n] n for(int i=0;i<n;i++) {
			 l[i] = std.nextInt();
		 } int i=0; int i=0; i 0 i<n i n i++ i++ i {
			 l[i] = std.nextInt();
		 } {
			 l[i] = std.nextInt();
		 } l[i] = std.nextInt() l[i] l i std.nextInt() std.nextInt std int d=0; d 0 int a=0; a 0 for(int i=0;i<n;i++) {
			 d+=l[i];
			 if(d>x) {
				 System.out.println(i+1);
				 a = 1;
				 break;
			 }
		 } int i=0; int i=0; i 0 i<n i n i++ i++ i {
			 d+=l[i];
			 if(d>x) {
				 System.out.println(i+1);
				 a = 1;
				 break;
			 }
		 } {
			 d+=l[i];
			 if(d>x) {
				 System.out.println(i+1);
				 a = 1;
				 break;
			 }
		 } d+=l[i] d l[i] l i if(d>x) {
				 System.out.println(i+1);
				 a = 1;
				 break;
			 } d>x d x {
				 System.out.println(i+1);
				 a = 1;
				 break;
			 } System.out.println(i+1) System.out.println System.out System System.out i+1 i 1 a = 1 a 1 break; if (a==0) {
			 System.out.println(n+1);
		 } a==0 a 0 {
			 System.out.println(n+1);
		 } 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 std = new Scanner(System.in);
		 int n = std.nextInt();
		 int x = std.nextInt();
		 int[] l = new int[n];
		 for(int i=0;i<n;i++) {
			 l[i] = std.nextInt();
		 }
		 int d=0;
		 int a=0;
		 for(int i=0;i<n;i++) {
			 d+=l[i];
			 if(d>x) {
				 System.out.println(i+1);
				 a = 1;
				 break;
			 }
		 }
		 if (a==0) {
			 System.out.println(n+1);
		 }
	 }
} public class Main {
	 public static void main(String args[]){
		 Scanner std = new Scanner(System.in);
		 int n = std.nextInt();
		 int x = std.nextInt();
		 int[] l = new int[n];
		 for(int i=0;i<n;i++) {
			 l[i] = std.nextInt();
		 }
		 int d=0;
		 int a=0;
		 for(int i=0;i<n;i++) {
			 d+=l[i];
			 if(d>x) {
				 System.out.println(i+1);
				 a = 1;
				 break;
			 }
		 }
		 if (a==0) {
			 System.out.println(n+1);
		 }
	 }
} Main
import java.util.Scanner;

public class Main {
	 public static void main(String args[]){
		 Scanner std = new Scanner(System.in);
		 int n = std.nextInt();
		 int x = std.nextInt();
		 int[] l = new int[n];
		 for(int i=0;i<n;i++) {
			 l[i] = std.nextInt();
		 }
		 int d=0;
		 int a=0;
		 for(int i=0;i<n;i++) {
			 d+=l[i];
			 if(d>x) {
				 System.out.println(i+1);
				 a = 1;
				 break;
			 }
		 }
		 if (a==0) {
			 System.out.println(n+1);
		 }
	 }
}
