import java.util.*;
import static java.lang.System.*;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n =sc.nextInt();
		int x = sc.nextInt();
		int cnt = 1;
		int value = 0;
		for (int i = 0; i < n; i ++){
			value += sc.nextInt();
			if(value <= x)
				cnt++;
		}
		out.println(cnt);

	}
} import java.util.*; util.* java import static java.lang.System.*; import static java.lang.System.*; import static java.lang.System.*; public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n =sc.nextInt();
		int x = sc.nextInt();
		int cnt = 1;
		int value = 0;
		for (int i = 0; i < n; i ++){
			value += sc.nextInt();
			if(value <= x)
				cnt++;
		}
		out.println(cnt);

	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n =sc.nextInt();
		int x = sc.nextInt();
		int cnt = 1;
		int value = 0;
		for (int i = 0; i < n; i ++){
			value += sc.nextInt();
			if(value <= x)
				cnt++;
		}
		out.println(cnt);

	} main {
		Scanner sc = new Scanner(System.in);
		int n =sc.nextInt();
		int x = sc.nextInt();
		int cnt = 1;
		int value = 0;
		for (int i = 0; i < n; i ++){
			value += sc.nextInt();
			if(value <= x)
				cnt++;
		}
		out.println(cnt);

	} 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 cnt = 1; cnt 1 int value = 0; value 0 for (int i = 0; i < n; i ++){
			value += sc.nextInt();
			if(value <= x)
				cnt++;
		} int i = 0; int i = 0; i 0 i < n i n i ++ i ++ i {
			value += sc.nextInt();
			if(value <= x)
				cnt++;
		} {
			value += sc.nextInt();
			if(value <= x)
				cnt++;
		} value += sc.nextInt() value sc.nextInt() sc.nextInt sc if(value <= x)
				cnt++; value <= x value x cnt++ cnt out.println(cnt) out.println out cnt 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 cnt = 1;
		int value = 0;
		for (int i = 0; i < n; i ++){
			value += sc.nextInt();
			if(value <= x)
				cnt++;
		}
		out.println(cnt);

	}
} public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n =sc.nextInt();
		int x = sc.nextInt();
		int cnt = 1;
		int value = 0;
		for (int i = 0; i < n; i ++){
			value += sc.nextInt();
			if(value <= x)
				cnt++;
		}
		out.println(cnt);

	}
} Main
import java.util.*;
import static java.lang.System.*;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n =sc.nextInt();
		int x = sc.nextInt();
		int cnt = 1;
		int value = 0;
		for (int i = 0; i < n; i ++){
			value += sc.nextInt();
			if(value <= x)
				cnt++;
		}
		out.println(cnt);

	}
}