import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		// ここにコードを挿入
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int x = sc.nextInt();
		int t = 0, s = 0, k = 1;
		for (int i = 1; i <= n; i++) {
			t = sc.nextInt();
			s += t;
			if (s <= x) {
				k++;
			}

		}
		System.out.println(k);
	}

} import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {
		// ここにコードを挿入
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int x = sc.nextInt();
		int t = 0, s = 0, k = 1;
		for (int i = 1; i <= n; i++) {
			t = sc.nextInt();
			s += t;
			if (s <= x) {
				k++;
			}

		}
		System.out.println(k);
	}

} Main public static void main(String[] args) {
		// ここにコードを挿入
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int x = sc.nextInt();
		int t = 0, s = 0, k = 1;
		for (int i = 1; i <= n; i++) {
			t = sc.nextInt();
			s += t;
			if (s <= x) {
				k++;
			}

		}
		System.out.println(k);
	} main {
		// ここにコードを挿入
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int x = sc.nextInt();
		int t = 0, s = 0, k = 1;
		for (int i = 1; i <= n; i++) {
			t = sc.nextInt();
			s += t;
			if (s <= x) {
				k++;
			}

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

		} int i = 1; int i = 1; i 1 i <= n i n i++ i++ i {
			t = sc.nextInt();
			s += t;
			if (s <= x) {
				k++;
			}

		} {
			t = sc.nextInt();
			s += t;
			if (s <= x) {
				k++;
			}

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

		}
		System.out.println(k);
	}

} public class Main {

	public static void main(String[] args) {
		// ここにコードを挿入
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int x = sc.nextInt();
		int t = 0, s = 0, k = 1;
		for (int i = 1; i <= n; i++) {
			t = sc.nextInt();
			s += t;
			if (s <= x) {
				k++;
			}

		}
		System.out.println(k);
	}

} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		// ここにコードを挿入
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int x = sc.nextInt();
		int t = 0, s = 0, k = 1;
		for (int i = 1; i <= n; i++) {
			t = sc.nextInt();
			s += t;
			if (s <= x) {
				k++;
			}

		}
		System.out.println(k);
	}

}