import java.util.Scanner;

public class Main {


	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int X = sc.nextInt();

		int p = 0;
		int count = 1;
		for(int i = 0 ; i < N ; i++){
			int q = sc.nextInt();
			p+=q;

			if(p<=X){
				count++;
			}
			else{
				System.out.println(count);
				break;
			}
		}

		if(count == N+1){
			System.out.println(count);
		}


			sc.close();
	}
} import java.util.Scanner; Scanner 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 p = 0;
		int count = 1;
		for(int i = 0 ; i < N ; i++){
			int q = sc.nextInt();
			p+=q;

			if(p<=X){
				count++;
			}
			else{
				System.out.println(count);
				break;
			}
		}

		if(count == N+1){
			System.out.println(count);
		}


			sc.close();
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int X = sc.nextInt();

		int p = 0;
		int count = 1;
		for(int i = 0 ; i < N ; i++){
			int q = sc.nextInt();
			p+=q;

			if(p<=X){
				count++;
			}
			else{
				System.out.println(count);
				break;
			}
		}

		if(count == N+1){
			System.out.println(count);
		}


			sc.close();
	} main {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int X = sc.nextInt();

		int p = 0;
		int count = 1;
		for(int i = 0 ; i < N ; i++){
			int q = sc.nextInt();
			p+=q;

			if(p<=X){
				count++;
			}
			else{
				System.out.println(count);
				break;
			}
		}

		if(count == N+1){
			System.out.println(count);
		}


			sc.close();
	} 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 p = 0; p 0 int count = 1; count 1 for(int i = 0 ; i < N ; i++){
			int q = sc.nextInt();
			p+=q;

			if(p<=X){
				count++;
			}
			else{
				System.out.println(count);
				break;
			}
		} int i = 0 ; int i = 0 ; i 0 i < N i N i++ i++ i {
			int q = sc.nextInt();
			p+=q;

			if(p<=X){
				count++;
			}
			else{
				System.out.println(count);
				break;
			}
		} {
			int q = sc.nextInt();
			p+=q;

			if(p<=X){
				count++;
			}
			else{
				System.out.println(count);
				break;
			}
		} int q = sc.nextInt(); q sc.nextInt() sc.nextInt sc p+=q p q if(p<=X){
				count++;
			}
			else{
				System.out.println(count);
				break;
			} p<=X p X {
				count++;
			} count++ count {
				System.out.println(count);
				break;
			} System.out.println(count) System.out.println System.out System System.out count break; if(count == N+1){
			System.out.println(count);
		} count == N+1 count N+1 N 1 {
			System.out.println(count);
		} System.out.println(count) System.out.println System.out System System.out count sc.close() sc.close sc 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 p = 0;
		int count = 1;
		for(int i = 0 ; i < N ; i++){
			int q = sc.nextInt();
			p+=q;

			if(p<=X){
				count++;
			}
			else{
				System.out.println(count);
				break;
			}
		}

		if(count == N+1){
			System.out.println(count);
		}


			sc.close();
	}
} public class Main {


	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int X = sc.nextInt();

		int p = 0;
		int count = 1;
		for(int i = 0 ; i < N ; i++){
			int q = sc.nextInt();
			p+=q;

			if(p<=X){
				count++;
			}
			else{
				System.out.println(count);
				break;
			}
		}

		if(count == N+1){
			System.out.println(count);
		}


			sc.close();
	}
} Main
import java.util.Scanner;

public class Main {


	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int X = sc.nextInt();

		int p = 0;
		int count = 1;
		for(int i = 0 ; i < N ; i++){
			int q = sc.nextInt();
			p+=q;

			if(p<=X){
				count++;
			}
			else{
				System.out.println(count);
				break;
			}
		}

		if(count == N+1){
			System.out.println(count);
		}


			sc.close();
	}
}
