import java.io.BufferedReader;
import java.io.InputStreamReader;

public class Main {

	public static void main(String[] args) throws Exception {
		// TODO 自動生成されたメソッド・スタブ
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
		String W = in.readLine();
		long N =  Long.parseLong(W.split(" ")[0]);
		long X =  Long.parseLong(W.split(" ")[1]);

		String[] Wi = in.readLine().split(" ");
		int n =1;
		long p=0;

		for(int i = 0;i<Wi.length;i++){
			p+=Integer.parseInt(Wi[i]);
			if(p <= X){
				n++;
			}
		}

		System.out.println(n);

	}
} import java.io.BufferedReader; BufferedReader java.io import java.io.InputStreamReader; InputStreamReader java.io public class Main {

	public static void main(String[] args) throws Exception {
		// TODO 自動生成されたメソッド・スタブ
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
		String W = in.readLine();
		long N =  Long.parseLong(W.split(" ")[0]);
		long X =  Long.parseLong(W.split(" ")[1]);

		String[] Wi = in.readLine().split(" ");
		int n =1;
		long p=0;

		for(int i = 0;i<Wi.length;i++){
			p+=Integer.parseInt(Wi[i]);
			if(p <= X){
				n++;
			}
		}

		System.out.println(n);

	}
} Main public static void main(String[] args) throws Exception {
		// TODO 自動生成されたメソッド・スタブ
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
		String W = in.readLine();
		long N =  Long.parseLong(W.split(" ")[0]);
		long X =  Long.parseLong(W.split(" ")[1]);

		String[] Wi = in.readLine().split(" ");
		int n =1;
		long p=0;

		for(int i = 0;i<Wi.length;i++){
			p+=Integer.parseInt(Wi[i]);
			if(p <= X){
				n++;
			}
		}

		System.out.println(n);

	} main {
		// TODO 自動生成されたメソッド・スタブ
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
		String W = in.readLine();
		long N =  Long.parseLong(W.split(" ")[0]);
		long X =  Long.parseLong(W.split(" ")[1]);

		String[] Wi = in.readLine().split(" ");
		int n =1;
		long p=0;

		for(int i = 0;i<Wi.length;i++){
			p+=Integer.parseInt(Wi[i]);
			if(p <= X){
				n++;
			}
		}

		System.out.println(n);

	} BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); in new BufferedReader(new InputStreamReader(System.in)) String W = in.readLine(); W in.readLine() in.readLine in long N =  Long.parseLong(W.split(" ")[0]); N Long.parseLong(W.split(" ")[0]) Long.parseLong Long W.split(" ")[0] W.split(" ") W.split W " " 0 long X =  Long.parseLong(W.split(" ")[1]); X Long.parseLong(W.split(" ")[1]) Long.parseLong Long W.split(" ")[1] W.split(" ") W.split W " " 1 String[] Wi = in.readLine().split(" "); Wi in.readLine().split(" ") in.readLine().split in.readLine() in.readLine in " " int n =1; n 1 long p=0; p 0 for(int i = 0;i<Wi.length;i++){
			p+=Integer.parseInt(Wi[i]);
			if(p <= X){
				n++;
			}
		} int i = 0; int i = 0; i 0 i<Wi.length i Wi.length Wi Wi.length i++ i++ i {
			p+=Integer.parseInt(Wi[i]);
			if(p <= X){
				n++;
			}
		} {
			p+=Integer.parseInt(Wi[i]);
			if(p <= X){
				n++;
			}
		} p+=Integer.parseInt(Wi[i]) p Integer.parseInt(Wi[i]) Integer.parseInt Integer Wi[i] Wi i if(p <= X){
				n++;
			} p <= X p X {
				n++;
			} n++ n System.out.println(n) System.out.println System.out System System.out n String[] args args public class Main {

	public static void main(String[] args) throws Exception {
		// TODO 自動生成されたメソッド・スタブ
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
		String W = in.readLine();
		long N =  Long.parseLong(W.split(" ")[0]);
		long X =  Long.parseLong(W.split(" ")[1]);

		String[] Wi = in.readLine().split(" ");
		int n =1;
		long p=0;

		for(int i = 0;i<Wi.length;i++){
			p+=Integer.parseInt(Wi[i]);
			if(p <= X){
				n++;
			}
		}

		System.out.println(n);

	}
} public class Main {

	public static void main(String[] args) throws Exception {
		// TODO 自動生成されたメソッド・スタブ
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
		String W = in.readLine();
		long N =  Long.parseLong(W.split(" ")[0]);
		long X =  Long.parseLong(W.split(" ")[1]);

		String[] Wi = in.readLine().split(" ");
		int n =1;
		long p=0;

		for(int i = 0;i<Wi.length;i++){
			p+=Integer.parseInt(Wi[i]);
			if(p <= X){
				n++;
			}
		}

		System.out.println(n);

	}
} Main
import java.io.BufferedReader;
import java.io.InputStreamReader;

public class Main {

	public static void main(String[] args) throws Exception {
		// TODO 自動生成されたメソッド・スタブ
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
		String W = in.readLine();
		long N =  Long.parseLong(W.split(" ")[0]);
		long X =  Long.parseLong(W.split(" ")[1]);

		String[] Wi = in.readLine().split(" ");
		int n =1;
		long p=0;

		for(int i = 0;i<Wi.length;i++){
			p+=Integer.parseInt(Wi[i]);
			if(p <= X){
				n++;
			}
		}

		System.out.println(n);

	}
}
