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];
		for (int i = 0; i < n; i++) {
			l[i]=scan.nextInt();
		}
		scan.close();
		int d=0;
		int cnt=1;
		for (int i = 0; i < n; i++) {
			d=d+l[i];
			if(d<=x)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];
		for (int i = 0; i < n; i++) {
			l[i]=scan.nextInt();
		}
		scan.close();
		int d=0;
		int cnt=1;
		for (int i = 0; i < n; i++) {
			d=d+l[i];
			if(d<=x)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];
		for (int i = 0; i < n; i++) {
			l[i]=scan.nextInt();
		}
		scan.close();
		int d=0;
		int cnt=1;
		for (int i = 0; i < n; i++) {
			d=d+l[i];
			if(d<=x)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];
		for (int i = 0; i < n; i++) {
			l[i]=scan.nextInt();
		}
		scan.close();
		int d=0;
		int cnt=1;
		for (int i = 0; i < n; i++) {
			d=d+l[i];
			if(d<=x)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 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]=scan.nextInt() l[i] l i scan.nextInt() scan.nextInt scan scan.close() scan.close scan int d=0; d 0 int cnt=1; cnt 1 for (int i = 0; i < n; i++) {
			d=d+l[i];
			if(d<=x)cnt++;
		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
			d=d+l[i];
			if(d<=x)cnt++;
		} {
			d=d+l[i];
			if(d<=x)cnt++;
		} d=d+l[i] d d+l[i] d l[i] l i if(d<=x)cnt++; d<=x d x 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];
		for (int i = 0; i < n; i++) {
			l[i]=scan.nextInt();
		}
		scan.close();
		int d=0;
		int cnt=1;
		for (int i = 0; i < n; i++) {
			d=d+l[i];
			if(d<=x)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];
		for (int i = 0; i < n; i++) {
			l[i]=scan.nextInt();
		}
		scan.close();
		int d=0;
		int cnt=1;
		for (int i = 0; i < n; i++) {
			d=d+l[i];
			if(d<=x)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];
		for (int i = 0; i < n; i++) {
			l[i]=scan.nextInt();
		}
		scan.close();
		int d=0;
		int cnt=1;
		for (int i = 0; i < n; i++) {
			d=d+l[i];
			if(d<=x)cnt++;
		}
		System.out.println(cnt);
	}
}