import java.util.Scanner;

public class Main{
	public static void main(String[] args){
		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		int x = scan.nextInt();

		int[] l = new int[n];

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

		long sum = 0;
		int cnt = 1;
		for(i = 0; i < n; i++) {
			sum += l[i];
			if(sum > x) {
				break;
			}else {
				cnt++;
			}
		}

		System.out.println(cnt);
	}
} import java.util.Scanner; Scanner java.util public class Main{
	public static void main(String[] args){
		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		int x = scan.nextInt();

		int[] l = new int[n];

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

		long sum = 0;
		int cnt = 1;
		for(i = 0; i < n; i++) {
			sum += l[i];
			if(sum > x) {
				break;
			}else {
				cnt++;
			}
		}

		System.out.println(cnt);
	}
} Main public static void main(String[] args){
		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		int x = scan.nextInt();

		int[] l = new int[n];

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

		long sum = 0;
		int cnt = 1;
		for(i = 0; i < n; i++) {
			sum += l[i];
			if(sum > x) {
				break;
			}else {
				cnt++;
			}
		}

		System.out.println(cnt);
	} main {
		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		int x = scan.nextInt();

		int[] l = new int[n];

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

		long sum = 0;
		int cnt = 1;
		for(i = 0; i < n; i++) {
			sum += l[i];
			if(sum > x) {
				break;
			}else {
				cnt++;
			}
		}

		System.out.println(cnt);
	} 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 int i; i for(i = 0; i < n; i++)
			l[i] = scan.nextInt(); i = 0; 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 long sum = 0; sum 0 int cnt = 1; cnt 1 for(i = 0; i < n; i++) {
			sum += l[i];
			if(sum > x) {
				break;
			}else {
				cnt++;
			}
		} i = 0; i = 0 i 0 i < n i n i++ i++ i {
			sum += l[i];
			if(sum > x) {
				break;
			}else {
				cnt++;
			}
		} {
			sum += l[i];
			if(sum > x) {
				break;
			}else {
				cnt++;
			}
		} sum += l[i] sum l[i] l i if(sum > x) {
				break;
			}else {
				cnt++;
			} sum > x sum x {
				break;
			} break; {
				cnt++;
			} cnt++ cnt 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 scan = new Scanner(System.in);
		int n = scan.nextInt();
		int x = scan.nextInt();

		int[] l = new int[n];

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

		long sum = 0;
		int cnt = 1;
		for(i = 0; i < n; i++) {
			sum += l[i];
			if(sum > x) {
				break;
			}else {
				cnt++;
			}
		}

		System.out.println(cnt);
	}
} public class Main{
	public static void main(String[] args){
		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		int x = scan.nextInt();

		int[] l = new int[n];

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

		long sum = 0;
		int cnt = 1;
		for(i = 0; i < n; i++) {
			sum += l[i];
			if(sum > x) {
				break;
			}else {
				cnt++;
			}
		}

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

public class Main{
	public static void main(String[] args){
		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		int x = scan.nextInt();

		int[] l = new int[n];

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

		long sum = 0;
		int cnt = 1;
		for(i = 0; i < n; i++) {
			sum += l[i];
			if(sum > x) {
				break;
			}else {
				cnt++;
			}
		}

		System.out.println(cnt);
	}
}
