import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		int n = in.nextInt();
		int x = in.nextInt();
		int[] l = new int[n];
		for(int i=0;i<n;i++) {
			l[i] = in.nextInt();
		}
		int count = 0;
		while(x>=0 && count<n) {
			x -= l[count];
			count++;
		}
		System.out.println(x<0?count:n+1);
		in.close();
	}

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

	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		int n = in.nextInt();
		int x = in.nextInt();
		int[] l = new int[n];
		for(int i=0;i<n;i++) {
			l[i] = in.nextInt();
		}
		int count = 0;
		while(x>=0 && count<n) {
			x -= l[count];
			count++;
		}
		System.out.println(x<0?count:n+1);
		in.close();
	}

} Main public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		int n = in.nextInt();
		int x = in.nextInt();
		int[] l = new int[n];
		for(int i=0;i<n;i++) {
			l[i] = in.nextInt();
		}
		int count = 0;
		while(x>=0 && count<n) {
			x -= l[count];
			count++;
		}
		System.out.println(x<0?count:n+1);
		in.close();
	} main {
		Scanner in = new Scanner(System.in);
		int n = in.nextInt();
		int x = in.nextInt();
		int[] l = new int[n];
		for(int i=0;i<n;i++) {
			l[i] = in.nextInt();
		}
		int count = 0;
		while(x>=0 && count<n) {
			x -= l[count];
			count++;
		}
		System.out.println(x<0?count:n+1);
		in.close();
	} Scanner in = new Scanner(System.in); in new Scanner(System.in) int n = in.nextInt(); n in.nextInt() in.nextInt in int x = in.nextInt(); x in.nextInt() in.nextInt in int[] l = new int[n]; l new int[n] n for(int i=0;i<n;i++) {
			l[i] = in.nextInt();
		} int i=0; int i=0; i 0 i<n i n i++ i++ i {
			l[i] = in.nextInt();
		} {
			l[i] = in.nextInt();
		} l[i] = in.nextInt() l[i] l i in.nextInt() in.nextInt in int count = 0; count 0 while(x>=0 && count<n) {
			x -= l[count];
			count++;
		} x>=0 && count<n x>=0 x 0 count<n count n {
			x -= l[count];
			count++;
		} x -= l[count] x l[count] l count count++ count System.out.println(x<0?count:n+1) System.out.println System.out System System.out x<0?count:n+1 x<0 x 0 count n+1 n 1 in.close() in.close in String[] args args public class Main {

	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		int n = in.nextInt();
		int x = in.nextInt();
		int[] l = new int[n];
		for(int i=0;i<n;i++) {
			l[i] = in.nextInt();
		}
		int count = 0;
		while(x>=0 && count<n) {
			x -= l[count];
			count++;
		}
		System.out.println(x<0?count:n+1);
		in.close();
	}

} public class Main {

	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		int n = in.nextInt();
		int x = in.nextInt();
		int[] l = new int[n];
		for(int i=0;i<n;i++) {
			l[i] = in.nextInt();
		}
		int count = 0;
		while(x>=0 && count<n) {
			x -= l[count];
			count++;
		}
		System.out.println(x<0?count:n+1);
		in.close();
	}

} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		int n = in.nextInt();
		int x = in.nextInt();
		int[] l = new int[n];
		for(int i=0;i<n;i++) {
			l[i] = in.nextInt();
		}
		int count = 0;
		while(x>=0 && count<n) {
			x -= l[count];
			count++;
		}
		System.out.println(x<0?count:n+1);
		in.close();
	}

}
