import java.util.*;

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

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt()+1;
		int X = sc.nextInt();
		int[] L = new int[N];
		int count=1;		
		L[0]=0;
		
		for(int i=1;i<N;i++) {
			L[i]=sc.nextInt()+L[i-1];
			if(L[i]<=X) {
				count++;
			}
		}
		
		System.out.println(count);
		sc.close();
	}
}
