import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String s1 = sc.nextLine();
		String[] spl1 = s1.split(" ");
		int N = Integer.parseInt(spl1[0]);
		int X = Integer.parseInt(spl1[1]);
		String s2 = sc.nextLine();
		String[] spl2 = s2.split(" ");
		int[] L = new int[N];
		for(int i = 0;i < N;i++){
			L[i] = Integer.parseInt(spl2[i]);
		}
		sc.close();

		int cnt = 1;
		int D = 0;
		for(int i = 0;i < N;i++){
			D += L[i];
			if(D > X)break;
			cnt++;
		}
		System.out.println(cnt);
	}
} import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String s1 = sc.nextLine();
		String[] spl1 = s1.split(" ");
		int N = Integer.parseInt(spl1[0]);
		int X = Integer.parseInt(spl1[1]);
		String s2 = sc.nextLine();
		String[] spl2 = s2.split(" ");
		int[] L = new int[N];
		for(int i = 0;i < N;i++){
			L[i] = Integer.parseInt(spl2[i]);
		}
		sc.close();

		int cnt = 1;
		int D = 0;
		for(int i = 0;i < N;i++){
			D += L[i];
			if(D > X)break;
			cnt++;
		}
		System.out.println(cnt);
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String s1 = sc.nextLine();
		String[] spl1 = s1.split(" ");
		int N = Integer.parseInt(spl1[0]);
		int X = Integer.parseInt(spl1[1]);
		String s2 = sc.nextLine();
		String[] spl2 = s2.split(" ");
		int[] L = new int[N];
		for(int i = 0;i < N;i++){
			L[i] = Integer.parseInt(spl2[i]);
		}
		sc.close();

		int cnt = 1;
		int D = 0;
		for(int i = 0;i < N;i++){
			D += L[i];
			if(D > X)break;
			cnt++;
		}
		System.out.println(cnt);
	} main {
		Scanner sc = new Scanner(System.in);
		String s1 = sc.nextLine();
		String[] spl1 = s1.split(" ");
		int N = Integer.parseInt(spl1[0]);
		int X = Integer.parseInt(spl1[1]);
		String s2 = sc.nextLine();
		String[] spl2 = s2.split(" ");
		int[] L = new int[N];
		for(int i = 0;i < N;i++){
			L[i] = Integer.parseInt(spl2[i]);
		}
		sc.close();

		int cnt = 1;
		int D = 0;
		for(int i = 0;i < N;i++){
			D += L[i];
			if(D > X)break;
			cnt++;
		}
		System.out.println(cnt);
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String s1 = sc.nextLine(); s1 sc.nextLine() sc.nextLine sc String[] spl1 = s1.split(" "); spl1 s1.split(" ") s1.split s1 " " int N = Integer.parseInt(spl1[0]); N Integer.parseInt(spl1[0]) Integer.parseInt Integer spl1[0] spl1 0 int X = Integer.parseInt(spl1[1]); X Integer.parseInt(spl1[1]) Integer.parseInt Integer spl1[1] spl1 1 String s2 = sc.nextLine(); s2 sc.nextLine() sc.nextLine sc String[] spl2 = s2.split(" "); spl2 s2.split(" ") s2.split s2 " " int[] L = new int[N]; L new int[N] N for(int i = 0;i < N;i++){
			L[i] = Integer.parseInt(spl2[i]);
		} int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
			L[i] = Integer.parseInt(spl2[i]);
		} {
			L[i] = Integer.parseInt(spl2[i]);
		} L[i] = Integer.parseInt(spl2[i]) L[i] L i Integer.parseInt(spl2[i]) Integer.parseInt Integer spl2[i] spl2 i sc.close() sc.close sc int cnt = 1; cnt 1 int D = 0; D 0 for(int i = 0;i < N;i++){
			D += L[i];
			if(D > X)break;
			cnt++;
		} int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
			D += L[i];
			if(D > X)break;
			cnt++;
		} {
			D += L[i];
			if(D > X)break;
			cnt++;
		} D += L[i] D L[i] L i if(D > X)break; D > X D X break; cnt++ cnt System.out.println(cnt) System.out.println System.out System System.out cnt String[] args args public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String s1 = sc.nextLine();
		String[] spl1 = s1.split(" ");
		int N = Integer.parseInt(spl1[0]);
		int X = Integer.parseInt(spl1[1]);
		String s2 = sc.nextLine();
		String[] spl2 = s2.split(" ");
		int[] L = new int[N];
		for(int i = 0;i < N;i++){
			L[i] = Integer.parseInt(spl2[i]);
		}
		sc.close();

		int cnt = 1;
		int D = 0;
		for(int i = 0;i < N;i++){
			D += L[i];
			if(D > X)break;
			cnt++;
		}
		System.out.println(cnt);
	}
} public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String s1 = sc.nextLine();
		String[] spl1 = s1.split(" ");
		int N = Integer.parseInt(spl1[0]);
		int X = Integer.parseInt(spl1[1]);
		String s2 = sc.nextLine();
		String[] spl2 = s2.split(" ");
		int[] L = new int[N];
		for(int i = 0;i < N;i++){
			L[i] = Integer.parseInt(spl2[i]);
		}
		sc.close();

		int cnt = 1;
		int D = 0;
		for(int i = 0;i < N;i++){
			D += L[i];
			if(D > X)break;
			cnt++;
		}
		System.out.println(cnt);
	}
} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String s1 = sc.nextLine();
		String[] spl1 = s1.split(" ");
		int N = Integer.parseInt(spl1[0]);
		int X = Integer.parseInt(spl1[1]);
		String s2 = sc.nextLine();
		String[] spl2 = s2.split(" ");
		int[] L = new int[N];
		for(int i = 0;i < N;i++){
			L[i] = Integer.parseInt(spl2[i]);
		}
		sc.close();

		int cnt = 1;
		int D = 0;
		for(int i = 0;i < N;i++){
			D += L[i];
			if(D > X)break;
			cnt++;
		}
		System.out.println(cnt);
	}
}