import java.util.Scanner;

public class Main {

	public static void main(final String[] args) {

		final Scanner sc = new Scanner(System.in);
		int N = Integer.parseInt(sc.next());
		int X = Integer.parseInt(sc.next());
		int[] l = new int[N];
		for (int i = 0; i < N; i++) {
			l[i] = Integer.parseInt(sc.next());
		}
		sc.close();

		int d = 0;
		int ans = 1;
		for (int i = 0; i < N; i++) {
			d += l[i];
			if (d <= X) {
				ans++;
			}
		}
		System.out.println(ans);
	}

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

	public static void main(final String[] args) {

		final Scanner sc = new Scanner(System.in);
		int N = Integer.parseInt(sc.next());
		int X = Integer.parseInt(sc.next());
		int[] l = new int[N];
		for (int i = 0; i < N; i++) {
			l[i] = Integer.parseInt(sc.next());
		}
		sc.close();

		int d = 0;
		int ans = 1;
		for (int i = 0; i < N; i++) {
			d += l[i];
			if (d <= X) {
				ans++;
			}
		}
		System.out.println(ans);
	}

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

		final Scanner sc = new Scanner(System.in);
		int N = Integer.parseInt(sc.next());
		int X = Integer.parseInt(sc.next());
		int[] l = new int[N];
		for (int i = 0; i < N; i++) {
			l[i] = Integer.parseInt(sc.next());
		}
		sc.close();

		int d = 0;
		int ans = 1;
		for (int i = 0; i < N; i++) {
			d += l[i];
			if (d <= X) {
				ans++;
			}
		}
		System.out.println(ans);
	} main {

		final Scanner sc = new Scanner(System.in);
		int N = Integer.parseInt(sc.next());
		int X = Integer.parseInt(sc.next());
		int[] l = new int[N];
		for (int i = 0; i < N; i++) {
			l[i] = Integer.parseInt(sc.next());
		}
		sc.close();

		int d = 0;
		int ans = 1;
		for (int i = 0; i < N; i++) {
			d += l[i];
			if (d <= X) {
				ans++;
			}
		}
		System.out.println(ans);
	} final Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int N = Integer.parseInt(sc.next()); N Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc int X = Integer.parseInt(sc.next()); X Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc int[] l = new int[N]; l new int[N] N for (int i = 0; i < N; i++) {
			l[i] = Integer.parseInt(sc.next());
		} int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
			l[i] = Integer.parseInt(sc.next());
		} {
			l[i] = Integer.parseInt(sc.next());
		} l[i] = Integer.parseInt(sc.next()) l[i] l i Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc sc.close() sc.close sc int d = 0; d 0 int ans = 1; ans 1 for (int i = 0; i < N; i++) {
			d += l[i];
			if (d <= X) {
				ans++;
			}
		} int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
			d += l[i];
			if (d <= X) {
				ans++;
			}
		} {
			d += l[i];
			if (d <= X) {
				ans++;
			}
		} d += l[i] d l[i] l i if (d <= X) {
				ans++;
			} d <= X d X {
				ans++;
			} ans++ ans System.out.println(ans) System.out.println System.out System System.out ans final String[] args args public class Main {

	public static void main(final String[] args) {

		final Scanner sc = new Scanner(System.in);
		int N = Integer.parseInt(sc.next());
		int X = Integer.parseInt(sc.next());
		int[] l = new int[N];
		for (int i = 0; i < N; i++) {
			l[i] = Integer.parseInt(sc.next());
		}
		sc.close();

		int d = 0;
		int ans = 1;
		for (int i = 0; i < N; i++) {
			d += l[i];
			if (d <= X) {
				ans++;
			}
		}
		System.out.println(ans);
	}

} public class Main {

	public static void main(final String[] args) {

		final Scanner sc = new Scanner(System.in);
		int N = Integer.parseInt(sc.next());
		int X = Integer.parseInt(sc.next());
		int[] l = new int[N];
		for (int i = 0; i < N; i++) {
			l[i] = Integer.parseInt(sc.next());
		}
		sc.close();

		int d = 0;
		int ans = 1;
		for (int i = 0; i < N; i++) {
			d += l[i];
			if (d <= X) {
				ans++;
			}
		}
		System.out.println(ans);
	}

} Main
import java.util.Scanner;

public class Main {

	public static void main(final String[] args) {

		final Scanner sc = new Scanner(System.in);
		int N = Integer.parseInt(sc.next());
		int X = Integer.parseInt(sc.next());
		int[] l = new int[N];
		for (int i = 0; i < N; i++) {
			l[i] = Integer.parseInt(sc.next());
		}
		sc.close();

		int d = 0;
		int ans = 1;
		for (int i = 0; i < N; i++) {
			d += l[i];
			if (d <= X) {
				ans++;
			}
		}
		System.out.println(ans);
	}

}
