import java.util.Scanner;
public class Main {
	public static void main(String[] args) {
		Scanner t=new Scanner(System.in);
		int N=t.nextInt(), X=t.nextInt(), cont =1, soma=0;
		int L[] = new int[N];
		for(int i = 0; i < N; i++) {
			L[i] = t.nextInt();
			soma += L[i];
			if(soma <= X) {
			cont += 1;
		}
		}
	
		System.out.println(cont);
	}
} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) {
		Scanner t=new Scanner(System.in);
		int N=t.nextInt(), X=t.nextInt(), cont =1, soma=0;
		int L[] = new int[N];
		for(int i = 0; i < N; i++) {
			L[i] = t.nextInt();
			soma += L[i];
			if(soma <= X) {
			cont += 1;
		}
		}
	
		System.out.println(cont);
	}
} Main public static void main(String[] args) {
		Scanner t=new Scanner(System.in);
		int N=t.nextInt(), X=t.nextInt(), cont =1, soma=0;
		int L[] = new int[N];
		for(int i = 0; i < N; i++) {
			L[i] = t.nextInt();
			soma += L[i];
			if(soma <= X) {
			cont += 1;
		}
		}
	
		System.out.println(cont);
	} main {
		Scanner t=new Scanner(System.in);
		int N=t.nextInt(), X=t.nextInt(), cont =1, soma=0;
		int L[] = new int[N];
		for(int i = 0; i < N; i++) {
			L[i] = t.nextInt();
			soma += L[i];
			if(soma <= X) {
			cont += 1;
		}
		}
	
		System.out.println(cont);
	} Scanner t=new Scanner(System.in); t new Scanner(System.in) int N=t.nextInt() N t.nextInt() t.nextInt t X=t.nextInt() X t.nextInt() t.nextInt t cont =1 cont 1 soma=0; soma 0 int L[] = new int[N]; L new int[N] N for(int i = 0; i < N; i++) {
			L[i] = t.nextInt();
			soma += L[i];
			if(soma <= X) {
			cont += 1;
		}
		} int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
			L[i] = t.nextInt();
			soma += L[i];
			if(soma <= X) {
			cont += 1;
		}
		} {
			L[i] = t.nextInt();
			soma += L[i];
			if(soma <= X) {
			cont += 1;
		}
		} L[i] = t.nextInt() L[i] L i t.nextInt() t.nextInt t soma += L[i] soma L[i] L i if(soma <= X) {
			cont += 1;
		} soma <= X soma X {
			cont += 1;
		} cont += 1 cont 1 System.out.println(cont) System.out.println System.out System System.out cont String[] args args public class Main {
	public static void main(String[] args) {
		Scanner t=new Scanner(System.in);
		int N=t.nextInt(), X=t.nextInt(), cont =1, soma=0;
		int L[] = new int[N];
		for(int i = 0; i < N; i++) {
			L[i] = t.nextInt();
			soma += L[i];
			if(soma <= X) {
			cont += 1;
		}
		}
	
		System.out.println(cont);
	}
} public class Main {
	public static void main(String[] args) {
		Scanner t=new Scanner(System.in);
		int N=t.nextInt(), X=t.nextInt(), cont =1, soma=0;
		int L[] = new int[N];
		for(int i = 0; i < N; i++) {
			L[i] = t.nextInt();
			soma += L[i];
			if(soma <= X) {
			cont += 1;
		}
		}
	
		System.out.println(cont);
	}
} Main
import java.util.Scanner;
public class Main {
	public static void main(String[] args) {
		Scanner t=new Scanner(System.in);
		int N=t.nextInt(), X=t.nextInt(), cont =1, soma=0;
		int L[] = new int[N];
		for(int i = 0; i < N; i++) {
			L[i] = t.nextInt();
			soma += L[i];
			if(soma <= X) {
			cont += 1;
		}
		}
	
		System.out.println(cont);
	}
}