import java.util.Scanner;

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];
		for(int i = 0; i < N; i++) {
			L[i] = sc.nextInt();
		}
		sc.close();
		int r = 1;
		int d = 0;
		for(int i = 0; i < N; i++) {
			d += L[i];
			if(d <= X) r++;
			// System.out.println((i + 1) + " d = " + d + " r = " + r);
		}
		System.out.println(r);
	}
} import java.util.Scanner; Scanner 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];
		for(int i = 0; i < N; i++) {
			L[i] = sc.nextInt();
		}
		sc.close();
		int r = 1;
		int d = 0;
		for(int i = 0; i < N; i++) {
			d += L[i];
			if(d <= X) r++;
			// System.out.println((i + 1) + " d = " + d + " r = " + r);
		}
		System.out.println(r);
	}
} 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];
		for(int i = 0; i < N; i++) {
			L[i] = sc.nextInt();
		}
		sc.close();
		int r = 1;
		int d = 0;
		for(int i = 0; i < N; i++) {
			d += L[i];
			if(d <= X) r++;
			// System.out.println((i + 1) + " d = " + d + " r = " + r);
		}
		System.out.println(r);
	} main {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int X = sc.nextInt();
		int[] L = new int[N];
		for(int i = 0; i < N; i++) {
			L[i] = sc.nextInt();
		}
		sc.close();
		int r = 1;
		int d = 0;
		for(int i = 0; i < N; i++) {
			d += L[i];
			if(d <= X) r++;
			// System.out.println((i + 1) + " d = " + d + " r = " + r);
		}
		System.out.println(r);
	} 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 for(int i = 0; i < N; i++) {
			L[i] = sc.nextInt();
		} int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
			L[i] = sc.nextInt();
		} {
			L[i] = sc.nextInt();
		} L[i] = sc.nextInt() L[i] L i sc.nextInt() sc.nextInt sc sc.close() sc.close sc int r = 1; r 1 int d = 0; d 0 for(int i = 0; i < N; i++) {
			d += L[i];
			if(d <= X) r++;
			// System.out.println((i + 1) + " d = " + d + " r = " + r);
		} int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
			d += L[i];
			if(d <= X) r++;
			// System.out.println((i + 1) + " d = " + d + " r = " + r);
		} {
			d += L[i];
			if(d <= X) r++;
			// System.out.println((i + 1) + " d = " + d + " r = " + r);
		} d += L[i] d L[i] L i if(d <= X) r++; d <= X d X r++ r System.out.println(r) System.out.println System.out System System.out r 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];
		for(int i = 0; i < N; i++) {
			L[i] = sc.nextInt();
		}
		sc.close();
		int r = 1;
		int d = 0;
		for(int i = 0; i < N; i++) {
			d += L[i];
			if(d <= X) r++;
			// System.out.println((i + 1) + " d = " + d + " r = " + r);
		}
		System.out.println(r);
	}
} 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];
		for(int i = 0; i < N; i++) {
			L[i] = sc.nextInt();
		}
		sc.close();
		int r = 1;
		int d = 0;
		for(int i = 0; i < N; i++) {
			d += L[i];
			if(d <= X) r++;
			// System.out.println((i + 1) + " d = " + d + " r = " + r);
		}
		System.out.println(r);
	}
} Main
import java.util.Scanner;

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];
		for(int i = 0; i < N; i++) {
			L[i] = sc.nextInt();
		}
		sc.close();
		int r = 1;
		int d = 0;
		for(int i = 0; i < N; i++) {
			d += L[i];
			if(d <= X) r++;
			// System.out.println((i + 1) + " d = " + d + " r = " + r);
		}
		System.out.println(r);
	}
}
