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 d = 0;
		int count = 1;

		while (count < (n + 1)) {
			d = d + scan.nextInt();
			if (d > x) {
				break;
			}
			count++;
		}

		System.out.println(count);

		scan.close();
	}

} 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 d = 0;
		int count = 1;

		while (count < (n + 1)) {
			d = d + scan.nextInt();
			if (d > x) {
				break;
			}
			count++;
		}

		System.out.println(count);

		scan.close();
	}

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

		int n = scan.nextInt();
		int x = scan.nextInt();

		int d = 0;
		int count = 1;

		while (count < (n + 1)) {
			d = d + scan.nextInt();
			if (d > x) {
				break;
			}
			count++;
		}

		System.out.println(count);

		scan.close();
	} main {
		Scanner scan = new Scanner(System.in);

		int n = scan.nextInt();
		int x = scan.nextInt();

		int d = 0;
		int count = 1;

		while (count < (n + 1)) {
			d = d + scan.nextInt();
			if (d > x) {
				break;
			}
			count++;
		}

		System.out.println(count);

		scan.close();
	} 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 d = 0; d 0 int count = 1; count 1 while (count < (n + 1)) {
			d = d + scan.nextInt();
			if (d > x) {
				break;
			}
			count++;
		} count < (n + 1) count (n + 1) n 1 {
			d = d + scan.nextInt();
			if (d > x) {
				break;
			}
			count++;
		} d = d + scan.nextInt() d d + scan.nextInt() d scan.nextInt() scan.nextInt scan if (d > x) {
				break;
			} d > x d x {
				break;
			} break; count++ count System.out.println(count) System.out.println System.out System System.out count scan.close() scan.close scan 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 d = 0;
		int count = 1;

		while (count < (n + 1)) {
			d = d + scan.nextInt();
			if (d > x) {
				break;
			}
			count++;
		}

		System.out.println(count);

		scan.close();
	}

} public class Main {

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

		int n = scan.nextInt();
		int x = scan.nextInt();

		int d = 0;
		int count = 1;

		while (count < (n + 1)) {
			d = d + scan.nextInt();
			if (d > x) {
				break;
			}
			count++;
		}

		System.out.println(count);

		scan.close();
	}

} 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 d = 0;
		int count = 1;

		while (count < (n + 1)) {
			d = d + scan.nextInt();
			if (d > x) {
				break;
			}
			count++;
		}

		System.out.println(count);

		scan.close();
	}

}