
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.List;
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);

		// input
		final int N = scan.nextInt();
		final int X = scan.nextInt();
		
		List<Integer> list = new ArrayList<>();
		for (int i = 0; i < N; i++) {
			list.add(scan.nextInt());
		}
		
		int index = 0;
		int count = 1;
		for (Integer i : list) {
			index += i;
			if (index <= X) {
				count++;
			}
		}
		
		System.out.println(count);
	}
} import java.util.ArrayList; ArrayList java.util import java.util.Collections; Collections java.util import java.util.Comparator; Comparator 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);

		// input
		final int N = scan.nextInt();
		final int X = scan.nextInt();
		
		List<Integer> list = new ArrayList<>();
		for (int i = 0; i < N; i++) {
			list.add(scan.nextInt());
		}
		
		int index = 0;
		int count = 1;
		for (Integer i : list) {
			index += i;
			if (index <= X) {
				count++;
			}
		}
		
		System.out.println(count);
	}
} Main public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);

		// input
		final int N = scan.nextInt();
		final int X = scan.nextInt();
		
		List<Integer> list = new ArrayList<>();
		for (int i = 0; i < N; i++) {
			list.add(scan.nextInt());
		}
		
		int index = 0;
		int count = 1;
		for (Integer i : list) {
			index += i;
			if (index <= X) {
				count++;
			}
		}
		
		System.out.println(count);
	} main {
		Scanner scan = new Scanner(System.in);

		// input
		final int N = scan.nextInt();
		final int X = scan.nextInt();
		
		List<Integer> list = new ArrayList<>();
		for (int i = 0; i < N; i++) {
			list.add(scan.nextInt());
		}
		
		int index = 0;
		int count = 1;
		for (Integer i : list) {
			index += i;
			if (index <= X) {
				count++;
			}
		}
		
		System.out.println(count);
	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) final int N = scan.nextInt(); N scan.nextInt() scan.nextInt scan final int X = scan.nextInt(); X scan.nextInt() scan.nextInt scan List<Integer> list = new ArrayList<>(); list new ArrayList<>() 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 int index = 0; index 0 int count = 1; count 1 for (Integer i : list) {
			index += i;
			if (index <= X) {
				count++;
			}
		} Integer i list {
			index += i;
			if (index <= X) {
				count++;
			}
		} {
			index += i;
			if (index <= X) {
				count++;
			}
		} index += i index i if (index <= X) {
				count++;
			} index <= X index 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);

		// input
		final int N = scan.nextInt();
		final int X = scan.nextInt();
		
		List<Integer> list = new ArrayList<>();
		for (int i = 0; i < N; i++) {
			list.add(scan.nextInt());
		}
		
		int index = 0;
		int count = 1;
		for (Integer i : list) {
			index += i;
			if (index <= X) {
				count++;
			}
		}
		
		System.out.println(count);
	}
} public class Main {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);

		// input
		final int N = scan.nextInt();
		final int X = scan.nextInt();
		
		List<Integer> list = new ArrayList<>();
		for (int i = 0; i < N; i++) {
			list.add(scan.nextInt());
		}
		
		int index = 0;
		int count = 1;
		for (Integer i : list) {
			index += i;
			if (index <= X) {
				count++;
			}
		}
		
		System.out.println(count);
	}
} Main

import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.List;
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);

		// input
		final int N = scan.nextInt();
		final int X = scan.nextInt();
		
		List<Integer> list = new ArrayList<>();
		for (int i = 0; i < N; i++) {
			list.add(scan.nextInt());
		}
		
		int index = 0;
		int count = 1;
		for (Integer i : list) {
			index += i;
			if (index <= X) {
				count++;
			}
		}
		
		System.out.println(count);
	}
}