import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		//Input
		Scanner sc = new Scanner(System.in);
		int N = Integer.parseInt(sc.next());
		int X = Integer.parseInt(sc.next());

		int L[] = new int[N];
		for(int i = 0; i < N ; i++) {
			L[i] = Integer.parseInt(sc.next());
		}
		sc.close();

		//Logic
		int answer = 1;
		int D = 0;

		for(int i = 0; i < N ; i++) {
			D = D + L[i];
			if(D <= X) {
				answer += 1;
			}else {
				break;
			}
		}

		//output
		System.out.print(answer);
	}

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

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		//Input
		Scanner sc = new Scanner(System.in);
		int N = Integer.parseInt(sc.next());
		int X = Integer.parseInt(sc.next());

		int L[] = new int[N];
		for(int i = 0; i < N ; i++) {
			L[i] = Integer.parseInt(sc.next());
		}
		sc.close();

		//Logic
		int answer = 1;
		int D = 0;

		for(int i = 0; i < N ; i++) {
			D = D + L[i];
			if(D <= X) {
				answer += 1;
			}else {
				break;
			}
		}

		//output
		System.out.print(answer);
	}

} Main public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		//Input
		Scanner sc = new Scanner(System.in);
		int N = Integer.parseInt(sc.next());
		int X = Integer.parseInt(sc.next());

		int L[] = new int[N];
		for(int i = 0; i < N ; i++) {
			L[i] = Integer.parseInt(sc.next());
		}
		sc.close();

		//Logic
		int answer = 1;
		int D = 0;

		for(int i = 0; i < N ; i++) {
			D = D + L[i];
			if(D <= X) {
				answer += 1;
			}else {
				break;
			}
		}

		//output
		System.out.print(answer);
	} main {
		// TODO 自動生成されたメソッド・スタブ
		//Input
		Scanner sc = new Scanner(System.in);
		int N = Integer.parseInt(sc.next());
		int X = Integer.parseInt(sc.next());

		int L[] = new int[N];
		for(int i = 0; i < N ; i++) {
			L[i] = Integer.parseInt(sc.next());
		}
		sc.close();

		//Logic
		int answer = 1;
		int D = 0;

		for(int i = 0; i < N ; i++) {
			D = D + L[i];
			if(D <= X) {
				answer += 1;
			}else {
				break;
			}
		}

		//output
		System.out.print(answer);
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int N = Integer.parseInt(sc.next()); N Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc int X = Integer.parseInt(sc.next()); X Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc int L[] = new int[N]; L new int[N] N for(int i = 0; i < N ; i++) {
			L[i] = Integer.parseInt(sc.next());
		} int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
			L[i] = Integer.parseInt(sc.next());
		} {
			L[i] = Integer.parseInt(sc.next());
		} L[i] = Integer.parseInt(sc.next()) L[i] L i Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc sc.close() sc.close sc int answer = 1; answer 1 int D = 0; D 0 for(int i = 0; i < N ; i++) {
			D = D + L[i];
			if(D <= X) {
				answer += 1;
			}else {
				break;
			}
		} int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
			D = D + L[i];
			if(D <= X) {
				answer += 1;
			}else {
				break;
			}
		} {
			D = D + L[i];
			if(D <= X) {
				answer += 1;
			}else {
				break;
			}
		} D = D + L[i] D D + L[i] D L[i] L i if(D <= X) {
				answer += 1;
			}else {
				break;
			} D <= X D X {
				answer += 1;
			} answer += 1 answer 1 {
				break;
			} break; System.out.print(answer) System.out.print System.out System System.out answer String[] args args public class Main {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		//Input
		Scanner sc = new Scanner(System.in);
		int N = Integer.parseInt(sc.next());
		int X = Integer.parseInt(sc.next());

		int L[] = new int[N];
		for(int i = 0; i < N ; i++) {
			L[i] = Integer.parseInt(sc.next());
		}
		sc.close();

		//Logic
		int answer = 1;
		int D = 0;

		for(int i = 0; i < N ; i++) {
			D = D + L[i];
			if(D <= X) {
				answer += 1;
			}else {
				break;
			}
		}

		//output
		System.out.print(answer);
	}

} public class Main {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		//Input
		Scanner sc = new Scanner(System.in);
		int N = Integer.parseInt(sc.next());
		int X = Integer.parseInt(sc.next());

		int L[] = new int[N];
		for(int i = 0; i < N ; i++) {
			L[i] = Integer.parseInt(sc.next());
		}
		sc.close();

		//Logic
		int answer = 1;
		int D = 0;

		for(int i = 0; i < N ; i++) {
			D = D + L[i];
			if(D <= X) {
				answer += 1;
			}else {
				break;
			}
		}

		//output
		System.out.print(answer);
	}

} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		//Input
		Scanner sc = new Scanner(System.in);
		int N = Integer.parseInt(sc.next());
		int X = Integer.parseInt(sc.next());

		int L[] = new int[N];
		for(int i = 0; i < N ; i++) {
			L[i] = Integer.parseInt(sc.next());
		}
		sc.close();

		//Logic
		int answer = 1;
		int D = 0;

		for(int i = 0; i < N ; i++) {
			D = D + L[i];
			if(D <= X) {
				answer += 1;
			}else {
				break;
			}
		}

		//output
		System.out.print(answer);
	}

}
