import java.util.ArrayList;
import java.util.List;
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();

		List<Integer> list = new ArrayList<>();
		list.add(0);

		for(int i = 0; i < N; i++) {
			list.add(scan.nextInt());
		}

		List<Integer> points = new ArrayList<>();

		int val = 0;
		for(int i = 0; i < N + 1; i++) {

			val += list.get(i);
			points.add(val);
		}
		
		int count  = 0;
		for(int i = 0; i < points.size(); i++) {
			if(points.get(i) <= X) {
				count++;
			}
		}
		System.out.println(count);
	}
} import java.util.ArrayList; ArrayList java.util import java.util.List; List java.util 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();

		List<Integer> list = new ArrayList<>();
		list.add(0);

		for(int i = 0; i < N; i++) {
			list.add(scan.nextInt());
		}

		List<Integer> points = new ArrayList<>();

		int val = 0;
		for(int i = 0; i < N + 1; i++) {

			val += list.get(i);
			points.add(val);
		}
		
		int count  = 0;
		for(int i = 0; i < points.size(); i++) {
			if(points.get(i) <= X) {
				count++;
			}
		}
		System.out.println(count);
	}
} Main public static void main(String[] args) {

		Scanner scan = new Scanner(System.in);

		int N = scan.nextInt();
		int X = scan.nextInt();

		List<Integer> list = new ArrayList<>();
		list.add(0);

		for(int i = 0; i < N; i++) {
			list.add(scan.nextInt());
		}

		List<Integer> points = new ArrayList<>();

		int val = 0;
		for(int i = 0; i < N + 1; i++) {

			val += list.get(i);
			points.add(val);
		}
		
		int count  = 0;
		for(int i = 0; i < points.size(); i++) {
			if(points.get(i) <= X) {
				count++;
			}
		}
		System.out.println(count);
	} main {

		Scanner scan = new Scanner(System.in);

		int N = scan.nextInt();
		int X = scan.nextInt();

		List<Integer> list = new ArrayList<>();
		list.add(0);

		for(int i = 0; i < N; i++) {
			list.add(scan.nextInt());
		}

		List<Integer> points = new ArrayList<>();

		int val = 0;
		for(int i = 0; i < N + 1; i++) {

			val += list.get(i);
			points.add(val);
		}
		
		int count  = 0;
		for(int i = 0; i < points.size(); i++) {
			if(points.get(i) <= X) {
				count++;
			}
		}
		System.out.println(count);
	} 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 List<Integer> list = new ArrayList<>(); list new ArrayList<>() list.add(0) list.add list 0 for(int i = 0; i < N; i++) {
			list.add(scan.nextInt());
		} int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
			list.add(scan.nextInt());
		} {
			list.add(scan.nextInt());
		} list.add(scan.nextInt()) list.add list scan.nextInt() scan.nextInt scan List<Integer> points = new ArrayList<>(); points new ArrayList<>() int val = 0; val 0 for(int i = 0; i < N + 1; i++) {

			val += list.get(i);
			points.add(val);
		} int i = 0; int i = 0; i 0 i < N + 1 i N + 1 N 1 i++ i++ i {

			val += list.get(i);
			points.add(val);
		} {

			val += list.get(i);
			points.add(val);
		} val += list.get(i) val list.get(i) list.get list i points.add(val) points.add points val int count  = 0; count 0 for(int i = 0; i < points.size(); i++) {
			if(points.get(i) <= X) {
				count++;
			}
		} int i = 0; int i = 0; i 0 i < points.size() i points.size() points.size points i++ i++ i {
			if(points.get(i) <= X) {
				count++;
			}
		} {
			if(points.get(i) <= X) {
				count++;
			}
		} if(points.get(i) <= X) {
				count++;
			} points.get(i) <= X points.get(i) points.get points i X {
				count++;
			} count++ count System.out.println(count) System.out.println System.out System System.out count 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();

		List<Integer> list = new ArrayList<>();
		list.add(0);

		for(int i = 0; i < N; i++) {
			list.add(scan.nextInt());
		}

		List<Integer> points = new ArrayList<>();

		int val = 0;
		for(int i = 0; i < N + 1; i++) {

			val += list.get(i);
			points.add(val);
		}
		
		int count  = 0;
		for(int i = 0; i < points.size(); i++) {
			if(points.get(i) <= X) {
				count++;
			}
		}
		System.out.println(count);
	}
} public class Main {

	public static void main(String[] args) {

		Scanner scan = new Scanner(System.in);

		int N = scan.nextInt();
		int X = scan.nextInt();

		List<Integer> list = new ArrayList<>();
		list.add(0);

		for(int i = 0; i < N; i++) {
			list.add(scan.nextInt());
		}

		List<Integer> points = new ArrayList<>();

		int val = 0;
		for(int i = 0; i < N + 1; i++) {

			val += list.get(i);
			points.add(val);
		}
		
		int count  = 0;
		for(int i = 0; i < points.size(); i++) {
			if(points.get(i) <= X) {
				count++;
			}
		}
		System.out.println(count);
	}
} Main
import java.util.ArrayList;
import java.util.List;
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();

		List<Integer> list = new ArrayList<>();
		list.add(0);

		for(int i = 0; i < N; i++) {
			list.add(scan.nextInt());
		}

		List<Integer> points = new ArrayList<>();

		int val = 0;
		for(int i = 0; i < N + 1; i++) {

			val += list.get(i);
			points.add(val);
		}
		
		int count  = 0;
		for(int i = 0; i < points.size(); i++) {
			if(points.get(i) <= X) {
				count++;
			}
		}
		System.out.println(count);
	}
}