import java.util.*;

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

		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int X = sc.nextInt();
		int sum = 0;
		int i;
		for(i = 0; i < N; i++) {
			sum += sc.nextInt();
			if(sum > X)break;
		}
		sc.close();
		System.out.println(i+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();
		int X = sc.nextInt();
		int sum = 0;
		int i;
		for(i = 0; i < N; i++) {
			sum += sc.nextInt();
			if(sum > X)break;
		}
		sc.close();
		System.out.println(i+1);
	}
} Main public static void main(String args[]) {

		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int X = sc.nextInt();
		int sum = 0;
		int i;
		for(i = 0; i < N; i++) {
			sum += sc.nextInt();
			if(sum > X)break;
		}
		sc.close();
		System.out.println(i+1);
	} main {

		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int X = sc.nextInt();
		int sum = 0;
		int i;
		for(i = 0; i < N; i++) {
			sum += sc.nextInt();
			if(sum > X)break;
		}
		sc.close();
		System.out.println(i+1);
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int N = sc.nextInt(); N sc.nextInt() sc.nextInt sc int X = sc.nextInt(); X sc.nextInt() sc.nextInt sc int sum = 0; sum 0 int i; i for(i = 0; i < N; i++) {
			sum += sc.nextInt();
			if(sum > X)break;
		} i = 0; i = 0 i 0 i < N i N i++ i++ i {
			sum += sc.nextInt();
			if(sum > X)break;
		} {
			sum += sc.nextInt();
			if(sum > X)break;
		} sum += sc.nextInt() sum sc.nextInt() sc.nextInt sc if(sum > X)break; sum > X sum X break; sc.close() sc.close sc System.out.println(i+1) System.out.println System.out System System.out i+1 i 1 String args[] args public class Main{
	public static void main(String args[]) {

		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int X = sc.nextInt();
		int sum = 0;
		int i;
		for(i = 0; i < N; i++) {
			sum += sc.nextInt();
			if(sum > X)break;
		}
		sc.close();
		System.out.println(i+1);
	}
} public class Main{
	public static void main(String args[]) {

		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int X = sc.nextInt();
		int sum = 0;
		int i;
		for(i = 0; i < N; i++) {
			sum += sc.nextInt();
			if(sum > X)break;
		}
		sc.close();
		System.out.println(i+1);
	}
} Main
import java.util.*;

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

		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int X = sc.nextInt();
		int sum = 0;
		int i;
		for(i = 0; i < N; i++) {
			sum += sc.nextInt();
			if(sum > X)break;
		}
		sc.close();
		System.out.println(i+1);
	}
}