import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.Arrays;
import java.util.Comparator;
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner in = new Scanner(new BufferedReader(new InputStreamReader(System.in)));
		int n = in.nextInt();
		int x = in.nextInt();
		int[] l = new int[n];
		for (int i = 0; i < n; i++)
			l[i] = in.nextInt();
		System.out.println(solve(n, x, l));
		in.close();
	}

	private static int solve(int n, int x, int[] l) {
		int d = 0;
		for (int i = 0; i < n; i++) {
			d += l[i];
			if (d > x)
				return i + 1;
		}
		return n + 1;
	}
} import java.io.BufferedReader; BufferedReader java.io import java.io.InputStreamReader; InputStreamReader java.io import java.util.Arrays; Arrays java.util import java.util.Comparator; Comparator java.util import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {
		Scanner in = new Scanner(new BufferedReader(new InputStreamReader(System.in)));
		int n = in.nextInt();
		int x = in.nextInt();
		int[] l = new int[n];
		for (int i = 0; i < n; i++)
			l[i] = in.nextInt();
		System.out.println(solve(n, x, l));
		in.close();
	}

	private static int solve(int n, int x, int[] l) {
		int d = 0;
		for (int i = 0; i < n; i++) {
			d += l[i];
			if (d > x)
				return i + 1;
		}
		return n + 1;
	}
} Main public static void main(String[] args) {
		Scanner in = new Scanner(new BufferedReader(new InputStreamReader(System.in)));
		int n = in.nextInt();
		int x = in.nextInt();
		int[] l = new int[n];
		for (int i = 0; i < n; i++)
			l[i] = in.nextInt();
		System.out.println(solve(n, x, l));
		in.close();
	} main {
		Scanner in = new Scanner(new BufferedReader(new InputStreamReader(System.in)));
		int n = in.nextInt();
		int x = in.nextInt();
		int[] l = new int[n];
		for (int i = 0; i < n; i++)
			l[i] = in.nextInt();
		System.out.println(solve(n, x, l));
		in.close();
	} Scanner in = new Scanner(new BufferedReader(new InputStreamReader(System.in))); in new Scanner(new BufferedReader(new InputStreamReader(System.in))) int n = in.nextInt(); n in.nextInt() in.nextInt in int x = in.nextInt(); x in.nextInt() in.nextInt in int[] l = new int[n]; l new int[n] n for (int i = 0; i < n; i++)
			l[i] = in.nextInt(); int i = 0; int i = 0; i 0 i < n i n i++ i++ i l[i] = in.nextInt(); l[i] = in.nextInt() l[i] l i in.nextInt() in.nextInt in System.out.println(solve(n, x, l)) System.out.println System.out System System.out solve(n, x, l) solve n x l in.close() in.close in String[] args args private static int solve(int n, int x, int[] l) {
		int d = 0;
		for (int i = 0; i < n; i++) {
			d += l[i];
			if (d > x)
				return i + 1;
		}
		return n + 1;
	} solve {
		int d = 0;
		for (int i = 0; i < n; i++) {
			d += l[i];
			if (d > x)
				return i + 1;
		}
		return n + 1;
	} int d = 0; d 0 for (int i = 0; i < n; i++) {
			d += l[i];
			if (d > x)
				return i + 1;
		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
			d += l[i];
			if (d > x)
				return i + 1;
		} {
			d += l[i];
			if (d > x)
				return i + 1;
		} d += l[i] d l[i] l i if (d > x)
				return i + 1; d > x d x return i + 1; i + 1 i 1 return n + 1; n + 1 n 1 int n n int x x int[] l l public class Main {

	public static void main(String[] args) {
		Scanner in = new Scanner(new BufferedReader(new InputStreamReader(System.in)));
		int n = in.nextInt();
		int x = in.nextInt();
		int[] l = new int[n];
		for (int i = 0; i < n; i++)
			l[i] = in.nextInt();
		System.out.println(solve(n, x, l));
		in.close();
	}

	private static int solve(int n, int x, int[] l) {
		int d = 0;
		for (int i = 0; i < n; i++) {
			d += l[i];
			if (d > x)
				return i + 1;
		}
		return n + 1;
	}
} public class Main {

	public static void main(String[] args) {
		Scanner in = new Scanner(new BufferedReader(new InputStreamReader(System.in)));
		int n = in.nextInt();
		int x = in.nextInt();
		int[] l = new int[n];
		for (int i = 0; i < n; i++)
			l[i] = in.nextInt();
		System.out.println(solve(n, x, l));
		in.close();
	}

	private static int solve(int n, int x, int[] l) {
		int d = 0;
		for (int i = 0; i < n; i++) {
			d += l[i];
			if (d > x)
				return i + 1;
		}
		return n + 1;
	}
} Main
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.Arrays;
import java.util.Comparator;
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner in = new Scanner(new BufferedReader(new InputStreamReader(System.in)));
		int n = in.nextInt();
		int x = in.nextInt();
		int[] l = new int[n];
		for (int i = 0; i < n; i++)
			l[i] = in.nextInt();
		System.out.println(solve(n, x, l));
		in.close();
	}

	private static int solve(int n, int x, int[] l) {
		int d = 0;
		for (int i = 0; i < n; i++) {
			d += l[i];
			if (d > x)
				return i + 1;
		}
		return n + 1;
	}
}
