import java.util.ArrayList;
import java.util.List;
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();
		List<Integer> L = new ArrayList<Integer>();
		int zahyo = 0;
		int answer = 0;

		for (int i = 1; i <= N; i++) {
			L.add(sc.nextInt());
		}

		for (int takasa : L) {
			zahyo += takasa;
			if (X < zahyo) break;
			answer++;
		}

		System.out.println(answer + 1);
	}
} 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 sc = new Scanner(System.in);
		int N = sc.nextInt();
		int X = sc.nextInt();
		List<Integer> L = new ArrayList<Integer>();
		int zahyo = 0;
		int answer = 0;

		for (int i = 1; i <= N; i++) {
			L.add(sc.nextInt());
		}

		for (int takasa : L) {
			zahyo += takasa;
			if (X < zahyo) break;
			answer++;
		}

		System.out.println(answer + 1);
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int X = sc.nextInt();
		List<Integer> L = new ArrayList<Integer>();
		int zahyo = 0;
		int answer = 0;

		for (int i = 1; i <= N; i++) {
			L.add(sc.nextInt());
		}

		for (int takasa : L) {
			zahyo += takasa;
			if (X < zahyo) break;
			answer++;
		}

		System.out.println(answer + 1);
	} main {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int X = sc.nextInt();
		List<Integer> L = new ArrayList<Integer>();
		int zahyo = 0;
		int answer = 0;

		for (int i = 1; i <= N; i++) {
			L.add(sc.nextInt());
		}

		for (int takasa : L) {
			zahyo += takasa;
			if (X < zahyo) break;
			answer++;
		}

		System.out.println(answer + 1);
	} 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 List<Integer> L = new ArrayList<Integer>(); L new ArrayList<Integer>() int zahyo = 0; zahyo 0 int answer = 0; answer 0 for (int i = 1; i <= N; i++) {
			L.add(sc.nextInt());
		} int i = 1; int i = 1; i 1 i <= N i N i++ i++ i {
			L.add(sc.nextInt());
		} {
			L.add(sc.nextInt());
		} L.add(sc.nextInt()) L.add L sc.nextInt() sc.nextInt sc for (int takasa : L) {
			zahyo += takasa;
			if (X < zahyo) break;
			answer++;
		} int takasa L {
			zahyo += takasa;
			if (X < zahyo) break;
			answer++;
		} {
			zahyo += takasa;
			if (X < zahyo) break;
			answer++;
		} zahyo += takasa zahyo takasa if (X < zahyo) break; X < zahyo X zahyo break; answer++ answer System.out.println(answer + 1) System.out.println System.out System System.out answer + 1 answer 1 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();
		List<Integer> L = new ArrayList<Integer>();
		int zahyo = 0;
		int answer = 0;

		for (int i = 1; i <= N; i++) {
			L.add(sc.nextInt());
		}

		for (int takasa : L) {
			zahyo += takasa;
			if (X < zahyo) break;
			answer++;
		}

		System.out.println(answer + 1);
	}
} public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int X = sc.nextInt();
		List<Integer> L = new ArrayList<Integer>();
		int zahyo = 0;
		int answer = 0;

		for (int i = 1; i <= N; i++) {
			L.add(sc.nextInt());
		}

		for (int takasa : L) {
			zahyo += takasa;
			if (X < zahyo) break;
			answer++;
		}

		System.out.println(answer + 1);
	}
} Main
import java.util.ArrayList;
import java.util.List;
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();
		List<Integer> L = new ArrayList<Integer>();
		int zahyo = 0;
		int answer = 0;

		for (int i = 1; i <= N; i++) {
			L.add(sc.nextInt());
		}

		for (int takasa : L) {
			zahyo += takasa;
			if (X < zahyo) break;
			answer++;
		}

		System.out.println(answer + 1);
	}
}
