import java.util.*;
public class Main {
	public static void main(String args[]) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int X = sc.nextInt();
		int L[] = new int[N];
		int sum = 0;
		int ans = 0;
		for(int i = 0; i < N; i++) {
			L[i] = sc.nextInt();
			sum += L[i];
			if(sum <= X) {
				ans++;
			}
		}
		
		System.out.println(++ans);
	}
} import java.util.*; util.* java public class Main {
	public static void main(String args[]) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int X = sc.nextInt();
		int L[] = new int[N];
		int sum = 0;
		int ans = 0;
		for(int i = 0; i < N; i++) {
			L[i] = sc.nextInt();
			sum += L[i];
			if(sum <= X) {
				ans++;
			}
		}
		
		System.out.println(++ans);
	}
} Main public static void main(String args[]) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int X = sc.nextInt();
		int L[] = new int[N];
		int sum = 0;
		int ans = 0;
		for(int i = 0; i < N; i++) {
			L[i] = sc.nextInt();
			sum += L[i];
			if(sum <= X) {
				ans++;
			}
		}
		
		System.out.println(++ans);
	} main {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int X = sc.nextInt();
		int L[] = new int[N];
		int sum = 0;
		int ans = 0;
		for(int i = 0; i < N; i++) {
			L[i] = sc.nextInt();
			sum += L[i];
			if(sum <= X) {
				ans++;
			}
		}
		
		System.out.println(++ans);
	} 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 L[] = new int[N]; L new int[N] N int sum = 0; sum 0 int ans = 0; ans 0 for(int i = 0; i < N; i++) {
			L[i] = sc.nextInt();
			sum += L[i];
			if(sum <= X) {
				ans++;
			}
		} int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
			L[i] = sc.nextInt();
			sum += L[i];
			if(sum <= X) {
				ans++;
			}
		} {
			L[i] = sc.nextInt();
			sum += L[i];
			if(sum <= X) {
				ans++;
			}
		} L[i] = sc.nextInt() L[i] L i sc.nextInt() sc.nextInt sc sum += L[i] sum L[i] L i if(sum <= X) {
				ans++;
			} sum <= X sum X {
				ans++;
			} ans++ ans System.out.println(++ans) System.out.println System.out System System.out ++ans ans String args[] args public class Main {
	public static void main(String args[]) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int X = sc.nextInt();
		int L[] = new int[N];
		int sum = 0;
		int ans = 0;
		for(int i = 0; i < N; i++) {
			L[i] = sc.nextInt();
			sum += L[i];
			if(sum <= X) {
				ans++;
			}
		}
		
		System.out.println(++ans);
	}
} public class Main {
	public static void main(String args[]) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int X = sc.nextInt();
		int L[] = new int[N];
		int sum = 0;
		int ans = 0;
		for(int i = 0; i < N; i++) {
			L[i] = sc.nextInt();
			sum += L[i];
			if(sum <= X) {
				ans++;
			}
		}
		
		System.out.println(++ans);
	}
} Main
import java.util.*;
public class Main {
	public static void main(String args[]) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int X = sc.nextInt();
		int L[] = new int[N];
		int sum = 0;
		int ans = 0;
		for(int i = 0; i < N; i++) {
			L[i] = sc.nextInt();
			sum += L[i];
			if(sum <= X) {
				ans++;
			}
		}
		
		System.out.println(++ans);
	}
}
