import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

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

	Scanner std = new Scanner(System.in);


	List<Integer> list = new ArrayList<>();
	int N = std.nextInt();
	int X = std.nextInt();

	int count = 1; //跳ねる回数
	int zahyo = 0; //座標

	for(int i = 0; i < N; i++) {
		int L = std.nextInt();
		list.add(L);

	}

	//count <= N+1 条件1
	//足していってた座標がX以下
	//

	for(int i = 0; i < N; i++) {
		zahyo += list.get(i);
		if(count > N+1 || zahyo > X) {
			break;
		}
		count++;
	}
		System.out.println(count);

	}


	}

 import java.util.ArrayList; ArrayList java.util import java.util.List; List java.util import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String args[]) {

	Scanner std = new Scanner(System.in);


	List<Integer> list = new ArrayList<>();
	int N = std.nextInt();
	int X = std.nextInt();

	int count = 1; //跳ねる回数
	int zahyo = 0; //座標

	for(int i = 0; i < N; i++) {
		int L = std.nextInt();
		list.add(L);

	}

	//count <= N+1 条件1
	//足していってた座標がX以下
	//

	for(int i = 0; i < N; i++) {
		zahyo += list.get(i);
		if(count > N+1 || zahyo > X) {
			break;
		}
		count++;
	}
		System.out.println(count);

	}


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

	Scanner std = new Scanner(System.in);


	List<Integer> list = new ArrayList<>();
	int N = std.nextInt();
	int X = std.nextInt();

	int count = 1; //跳ねる回数
	int zahyo = 0; //座標

	for(int i = 0; i < N; i++) {
		int L = std.nextInt();
		list.add(L);

	}

	//count <= N+1 条件1
	//足していってた座標がX以下
	//

	for(int i = 0; i < N; i++) {
		zahyo += list.get(i);
		if(count > N+1 || zahyo > X) {
			break;
		}
		count++;
	}
		System.out.println(count);

	} main {

	Scanner std = new Scanner(System.in);


	List<Integer> list = new ArrayList<>();
	int N = std.nextInt();
	int X = std.nextInt();

	int count = 1; //跳ねる回数
	int zahyo = 0; //座標

	for(int i = 0; i < N; i++) {
		int L = std.nextInt();
		list.add(L);

	}

	//count <= N+1 条件1
	//足していってた座標がX以下
	//

	for(int i = 0; i < N; i++) {
		zahyo += list.get(i);
		if(count > N+1 || zahyo > X) {
			break;
		}
		count++;
	}
		System.out.println(count);

	} Scanner std = new Scanner(System.in); std new Scanner(System.in) List<Integer> list = new ArrayList<>(); list new ArrayList<>() int N = std.nextInt(); N std.nextInt() std.nextInt std int X = std.nextInt(); X std.nextInt() std.nextInt std int count = 1; count 1 int zahyo = 0; zahyo 0 for(int i = 0; i < N; i++) {
		int L = std.nextInt();
		list.add(L);

	} int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
		int L = std.nextInt();
		list.add(L);

	} {
		int L = std.nextInt();
		list.add(L);

	} int L = std.nextInt(); L std.nextInt() std.nextInt std list.add(L) list.add list L for(int i = 0; i < N; i++) {
		zahyo += list.get(i);
		if(count > N+1 || zahyo > X) {
			break;
		}
		count++;
	} int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
		zahyo += list.get(i);
		if(count > N+1 || zahyo > X) {
			break;
		}
		count++;
	} {
		zahyo += list.get(i);
		if(count > N+1 || zahyo > X) {
			break;
		}
		count++;
	} zahyo += list.get(i) zahyo list.get(i) list.get list i if(count > N+1 || zahyo > X) {
			break;
		} count > N+1 || zahyo > X count > N+1 count N+1 N 1 zahyo > X zahyo X {
			break;
		} break; count++ count System.out.println(count) System.out.println System.out System System.out count String args[] args public class Main {
	public static void main(String args[]) {

	Scanner std = new Scanner(System.in);


	List<Integer> list = new ArrayList<>();
	int N = std.nextInt();
	int X = std.nextInt();

	int count = 1; //跳ねる回数
	int zahyo = 0; //座標

	for(int i = 0; i < N; i++) {
		int L = std.nextInt();
		list.add(L);

	}

	//count <= N+1 条件1
	//足していってた座標がX以下
	//

	for(int i = 0; i < N; i++) {
		zahyo += list.get(i);
		if(count > N+1 || zahyo > X) {
			break;
		}
		count++;
	}
		System.out.println(count);

	}


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

	Scanner std = new Scanner(System.in);


	List<Integer> list = new ArrayList<>();
	int N = std.nextInt();
	int X = std.nextInt();

	int count = 1; //跳ねる回数
	int zahyo = 0; //座標

	for(int i = 0; i < N; i++) {
		int L = std.nextInt();
		list.add(L);

	}

	//count <= N+1 条件1
	//足していってた座標がX以下
	//

	for(int i = 0; i < N; i++) {
		zahyo += list.get(i);
		if(count > N+1 || zahyo > X) {
			break;
		}
		count++;
	}
		System.out.println(count);

	}


	} Main
import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

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

	Scanner std = new Scanner(System.in);


	List<Integer> list = new ArrayList<>();
	int N = std.nextInt();
	int X = std.nextInt();

	int count = 1; //跳ねる回数
	int zahyo = 0; //座標

	for(int i = 0; i < N; i++) {
		int L = std.nextInt();
		list.add(L);

	}

	//count <= N+1 条件1
	//足していってた座標がX以下
	//

	for(int i = 0; i < N; i++) {
		zahyo += list.get(i);
		if(count > N+1 || zahyo > X) {
			break;
		}
		count++;
	}
		System.out.println(count);

	}


	}


