import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int X = sc.nextInt();

		int c = 1;
		int D = 0;
		for (int i = 0; i < N; i++) {
			int L = sc.nextInt();
			D += L;
			if (D > X)
				break;
			c++;
		}

		System.out.println(c);
	}
} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int X = sc.nextInt();

		int c = 1;
		int D = 0;
		for (int i = 0; i < N; i++) {
			int L = sc.nextInt();
			D += L;
			if (D > X)
				break;
			c++;
		}

		System.out.println(c);
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int X = sc.nextInt();

		int c = 1;
		int D = 0;
		for (int i = 0; i < N; i++) {
			int L = sc.nextInt();
			D += L;
			if (D > X)
				break;
			c++;
		}

		System.out.println(c);
	} main {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int X = sc.nextInt();

		int c = 1;
		int D = 0;
		for (int i = 0; i < N; i++) {
			int L = sc.nextInt();
			D += L;
			if (D > X)
				break;
			c++;
		}

		System.out.println(c);
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int N = sc.nextInt(); N sc.nextInt() sc.nextInt sc int X = sc.nextInt(); X sc.nextInt() sc.nextInt sc int c = 1; c 1 int D = 0; D 0 for (int i = 0; i < N; i++) {
			int L = sc.nextInt();
			D += L;
			if (D > X)
				break;
			c++;
		} int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
			int L = sc.nextInt();
			D += L;
			if (D > X)
				break;
			c++;
		} {
			int L = sc.nextInt();
			D += L;
			if (D > X)
				break;
			c++;
		} int L = sc.nextInt(); L sc.nextInt() sc.nextInt sc D += L D L if (D > X)
				break; D > X D X break; c++ c System.out.println(c) System.out.println System.out System System.out c String[] args args public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int X = sc.nextInt();

		int c = 1;
		int D = 0;
		for (int i = 0; i < N; i++) {
			int L = sc.nextInt();
			D += L;
			if (D > X)
				break;
			c++;
		}

		System.out.println(c);
	}
} public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int X = sc.nextInt();

		int c = 1;
		int D = 0;
		for (int i = 0; i < N; i++) {
			int L = sc.nextInt();
			D += L;
			if (D > X)
				break;
			c++;
		}

		System.out.println(c);
	}
} Main
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int X = sc.nextInt();

		int c = 1;
		int D = 0;
		for (int i = 0; i < N; i++) {
			int L = sc.nextInt();
			D += L;
			if (D > X)
				break;
			c++;
		}

		System.out.println(c);
	}
}