import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner scan = new Scanner(System.in);

		int n = scan.nextInt();
		int x = scan.nextInt();
		int[] l = new int[n];
		for (int i = 0; i < n; i++)
			l[i] = scan.nextInt();

		int bound = 0;
		int flag = 0;
		for (int i = 0; i < n; i++) {
			bound += l[i];

			if (bound > x) {
				System.out.println(i + 1);
				flag = 1;
				break;
			}
		}

		if (flag == 0) {
			System.out.println(n + 1);
		}

	}

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

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner scan = new Scanner(System.in);

		int n = scan.nextInt();
		int x = scan.nextInt();
		int[] l = new int[n];
		for (int i = 0; i < n; i++)
			l[i] = scan.nextInt();

		int bound = 0;
		int flag = 0;
		for (int i = 0; i < n; i++) {
			bound += l[i];

			if (bound > x) {
				System.out.println(i + 1);
				flag = 1;
				break;
			}
		}

		if (flag == 0) {
			System.out.println(n + 1);
		}

	}

} Main public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner scan = new Scanner(System.in);

		int n = scan.nextInt();
		int x = scan.nextInt();
		int[] l = new int[n];
		for (int i = 0; i < n; i++)
			l[i] = scan.nextInt();

		int bound = 0;
		int flag = 0;
		for (int i = 0; i < n; i++) {
			bound += l[i];

			if (bound > x) {
				System.out.println(i + 1);
				flag = 1;
				break;
			}
		}

		if (flag == 0) {
			System.out.println(n + 1);
		}

	} main {
		// TODO 自動生成されたメソッド・スタブ
		Scanner scan = new Scanner(System.in);

		int n = scan.nextInt();
		int x = scan.nextInt();
		int[] l = new int[n];
		for (int i = 0; i < n; i++)
			l[i] = scan.nextInt();

		int bound = 0;
		int flag = 0;
		for (int i = 0; i < n; i++) {
			bound += l[i];

			if (bound > x) {
				System.out.println(i + 1);
				flag = 1;
				break;
			}
		}

		if (flag == 0) {
			System.out.println(n + 1);
		}

	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int n = scan.nextInt(); n scan.nextInt() scan.nextInt scan int x = scan.nextInt(); x scan.nextInt() scan.nextInt scan int[] l = new int[n]; l new int[n] n for (int i = 0; i < n; i++)
			l[i] = scan.nextInt(); int i = 0; int i = 0; i 0 i < n i n i++ i++ i l[i] = scan.nextInt(); l[i] = scan.nextInt() l[i] l i scan.nextInt() scan.nextInt scan int bound = 0; bound 0 int flag = 0; flag 0 for (int i = 0; i < n; i++) {
			bound += l[i];

			if (bound > x) {
				System.out.println(i + 1);
				flag = 1;
				break;
			}
		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
			bound += l[i];

			if (bound > x) {
				System.out.println(i + 1);
				flag = 1;
				break;
			}
		} {
			bound += l[i];

			if (bound > x) {
				System.out.println(i + 1);
				flag = 1;
				break;
			}
		} bound += l[i] bound l[i] l i if (bound > x) {
				System.out.println(i + 1);
				flag = 1;
				break;
			} bound > x bound x {
				System.out.println(i + 1);
				flag = 1;
				break;
			} System.out.println(i + 1) System.out.println System.out System System.out i + 1 i 1 flag = 1 flag 1 break; if (flag == 0) {
			System.out.println(n + 1);
		} flag == 0 flag 0 {
			System.out.println(n + 1);
		} System.out.println(n + 1) System.out.println System.out System System.out n + 1 n 1 String[] args args public class Main {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner scan = new Scanner(System.in);

		int n = scan.nextInt();
		int x = scan.nextInt();
		int[] l = new int[n];
		for (int i = 0; i < n; i++)
			l[i] = scan.nextInt();

		int bound = 0;
		int flag = 0;
		for (int i = 0; i < n; i++) {
			bound += l[i];

			if (bound > x) {
				System.out.println(i + 1);
				flag = 1;
				break;
			}
		}

		if (flag == 0) {
			System.out.println(n + 1);
		}

	}

} public class Main {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner scan = new Scanner(System.in);

		int n = scan.nextInt();
		int x = scan.nextInt();
		int[] l = new int[n];
		for (int i = 0; i < n; i++)
			l[i] = scan.nextInt();

		int bound = 0;
		int flag = 0;
		for (int i = 0; i < n; i++) {
			bound += l[i];

			if (bound > x) {
				System.out.println(i + 1);
				flag = 1;
				break;
			}
		}

		if (flag == 0) {
			System.out.println(n + 1);
		}

	}

} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner scan = new Scanner(System.in);

		int n = scan.nextInt();
		int x = scan.nextInt();
		int[] l = new int[n];
		for (int i = 0; i < n; i++)
			l[i] = scan.nextInt();

		int bound = 0;
		int flag = 0;
		for (int i = 0; i < n; i++) {
			bound += l[i];

			if (bound > x) {
				System.out.println(i + 1);
				flag = 1;
				break;
			}
		}

		if (flag == 0) {
			System.out.println(n + 1);
		}

	}

}