import java.util.Scanner;

public class Main {

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

		int sum = 0;
		int boundtime = 1;
		int i=0;
		do {
			i++;
			sum+=sc.nextInt();
			if(sum <= X) {
				boundtime++;
			}
		}while(i < N);
		sc.close();
		System.out.println(boundtime);
	}

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

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

		int sum = 0;
		int boundtime = 1;
		int i=0;
		do {
			i++;
			sum+=sc.nextInt();
			if(sum <= X) {
				boundtime++;
			}
		}while(i < N);
		sc.close();
		System.out.println(boundtime);
	}

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

		int sum = 0;
		int boundtime = 1;
		int i=0;
		do {
			i++;
			sum+=sc.nextInt();
			if(sum <= X) {
				boundtime++;
			}
		}while(i < N);
		sc.close();
		System.out.println(boundtime);
	} main {
		// TODO 自動生成されたメソッド・スタブ
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int X = sc.nextInt();

		int sum = 0;
		int boundtime = 1;
		int i=0;
		do {
			i++;
			sum+=sc.nextInt();
			if(sum <= X) {
				boundtime++;
			}
		}while(i < N);
		sc.close();
		System.out.println(boundtime);
	} 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 sum = 0; sum 0 int boundtime = 1; boundtime 1 int i=0; i 0 do {
			i++;
			sum+=sc.nextInt();
			if(sum <= X) {
				boundtime++;
			}
		}while(i < N); i < N i N {
			i++;
			sum+=sc.nextInt();
			if(sum <= X) {
				boundtime++;
			}
		} i++ i sum+=sc.nextInt() sum sc.nextInt() sc.nextInt sc if(sum <= X) {
				boundtime++;
			} sum <= X sum X {
				boundtime++;
			} boundtime++ boundtime sc.close() sc.close sc System.out.println(boundtime) System.out.println System.out System System.out boundtime String[] args args public class Main {

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

		int sum = 0;
		int boundtime = 1;
		int i=0;
		do {
			i++;
			sum+=sc.nextInt();
			if(sum <= X) {
				boundtime++;
			}
		}while(i < N);
		sc.close();
		System.out.println(boundtime);
	}

} public class Main {

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

		int sum = 0;
		int boundtime = 1;
		int i=0;
		do {
			i++;
			sum+=sc.nextInt();
			if(sum <= X) {
				boundtime++;
			}
		}while(i < N);
		sc.close();
		System.out.println(boundtime);
	}

} Main
import java.util.Scanner;

public class Main {

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

		int sum = 0;
		int boundtime = 1;
		int i=0;
		do {
			i++;
			sum+=sc.nextInt();
			if(sum <= X) {
				boundtime++;
			}
		}while(i < N);
		sc.close();
		System.out.println(boundtime);
	}

}
