import java.util.Scanner;

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

		Scanner sc = new Scanner(System.in);

		String line[] = sc.nextLine().split(" ");

		int n = Integer.parseInt(line[0]);
		int x = Integer.parseInt(line[1]);

		int height = 0;
		int cnt = 1;

		for(int i = 0; i < n; i++) {
			int l = sc.nextInt();

			height += l;

			if(height > x) {
				break;
			}
			cnt++;
		}

		sc.close();
		System.out.println(cnt);
	}
} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String args[]){

		Scanner sc = new Scanner(System.in);

		String line[] = sc.nextLine().split(" ");

		int n = Integer.parseInt(line[0]);
		int x = Integer.parseInt(line[1]);

		int height = 0;
		int cnt = 1;

		for(int i = 0; i < n; i++) {
			int l = sc.nextInt();

			height += l;

			if(height > x) {
				break;
			}
			cnt++;
		}

		sc.close();
		System.out.println(cnt);
	}
} Main public static void main(String args[]){

		Scanner sc = new Scanner(System.in);

		String line[] = sc.nextLine().split(" ");

		int n = Integer.parseInt(line[0]);
		int x = Integer.parseInt(line[1]);

		int height = 0;
		int cnt = 1;

		for(int i = 0; i < n; i++) {
			int l = sc.nextInt();

			height += l;

			if(height > x) {
				break;
			}
			cnt++;
		}

		sc.close();
		System.out.println(cnt);
	} main {

		Scanner sc = new Scanner(System.in);

		String line[] = sc.nextLine().split(" ");

		int n = Integer.parseInt(line[0]);
		int x = Integer.parseInt(line[1]);

		int height = 0;
		int cnt = 1;

		for(int i = 0; i < n; i++) {
			int l = sc.nextInt();

			height += l;

			if(height > x) {
				break;
			}
			cnt++;
		}

		sc.close();
		System.out.println(cnt);
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String line[] = sc.nextLine().split(" "); line sc.nextLine().split(" ") sc.nextLine().split sc.nextLine() sc.nextLine sc " " int n = Integer.parseInt(line[0]); n Integer.parseInt(line[0]) Integer.parseInt Integer line[0] line 0 int x = Integer.parseInt(line[1]); x Integer.parseInt(line[1]) Integer.parseInt Integer line[1] line 1 int height = 0; height 0 int cnt = 1; cnt 1 for(int i = 0; i < n; i++) {
			int l = sc.nextInt();

			height += l;

			if(height > x) {
				break;
			}
			cnt++;
		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
			int l = sc.nextInt();

			height += l;

			if(height > x) {
				break;
			}
			cnt++;
		} {
			int l = sc.nextInt();

			height += l;

			if(height > x) {
				break;
			}
			cnt++;
		} int l = sc.nextInt(); l sc.nextInt() sc.nextInt sc height += l height l if(height > x) {
				break;
			} height > x height x {
				break;
			} break; cnt++ cnt sc.close() sc.close sc System.out.println(cnt) System.out.println System.out System System.out cnt String args[] args public class Main {
	public static void main(String args[]){

		Scanner sc = new Scanner(System.in);

		String line[] = sc.nextLine().split(" ");

		int n = Integer.parseInt(line[0]);
		int x = Integer.parseInt(line[1]);

		int height = 0;
		int cnt = 1;

		for(int i = 0; i < n; i++) {
			int l = sc.nextInt();

			height += l;

			if(height > x) {
				break;
			}
			cnt++;
		}

		sc.close();
		System.out.println(cnt);
	}
} public class Main {
	public static void main(String args[]){

		Scanner sc = new Scanner(System.in);

		String line[] = sc.nextLine().split(" ");

		int n = Integer.parseInt(line[0]);
		int x = Integer.parseInt(line[1]);

		int height = 0;
		int cnt = 1;

		for(int i = 0; i < n; i++) {
			int l = sc.nextInt();

			height += l;

			if(height > x) {
				break;
			}
			cnt++;
		}

		sc.close();
		System.out.println(cnt);
	}
} Main
import java.util.Scanner;

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

		Scanner sc = new Scanner(System.in);

		String line[] = sc.nextLine().split(" ");

		int n = Integer.parseInt(line[0]);
		int x = Integer.parseInt(line[1]);

		int height = 0;
		int cnt = 1;

		for(int i = 0; i < n; i++) {
			int l = sc.nextInt();

			height += l;

			if(height > x) {
				break;
			}
			cnt++;
		}

		sc.close();
		System.out.println(cnt);
	}
}
