import java.util.Scanner;
public class Main {
	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		int n = in.nextInt();
		int x = in.nextInt();

		int[] l = new int[n];
		for ( int i = 0; i < n; i++ ) {
			l[i] = in.nextInt();
		}

		int cnt = 1;
		int sum = 0;
		for ( int i = 0; i < n; i++ ) {			
			sum += l[i];
			if ( x < sum ) break;			
			cnt++;
		}

		System.out.println(cnt);
		in.close();
	}
} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		int n = in.nextInt();
		int x = in.nextInt();

		int[] l = new int[n];
		for ( int i = 0; i < n; i++ ) {
			l[i] = in.nextInt();
		}

		int cnt = 1;
		int sum = 0;
		for ( int i = 0; i < n; i++ ) {			
			sum += l[i];
			if ( x < sum ) break;			
			cnt++;
		}

		System.out.println(cnt);
		in.close();
	}
} Main public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		int n = in.nextInt();
		int x = in.nextInt();

		int[] l = new int[n];
		for ( int i = 0; i < n; i++ ) {
			l[i] = in.nextInt();
		}

		int cnt = 1;
		int sum = 0;
		for ( int i = 0; i < n; i++ ) {			
			sum += l[i];
			if ( x < sum ) break;			
			cnt++;
		}

		System.out.println(cnt);
		in.close();
	} main {
		Scanner in = new Scanner(System.in);
		int n = in.nextInt();
		int x = in.nextInt();

		int[] l = new int[n];
		for ( int i = 0; i < n; i++ ) {
			l[i] = in.nextInt();
		}

		int cnt = 1;
		int sum = 0;
		for ( int i = 0; i < n; i++ ) {			
			sum += l[i];
			if ( x < sum ) break;			
			cnt++;
		}

		System.out.println(cnt);
		in.close();
	} Scanner in = new Scanner(System.in); in new Scanner(System.in) int n = in.nextInt(); n in.nextInt() in.nextInt in int x = in.nextInt(); x in.nextInt() in.nextInt in int[] l = new int[n]; l new int[n] n for ( int i = 0; i < n; i++ ) {
			l[i] = in.nextInt();
		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
			l[i] = in.nextInt();
		} {
			l[i] = in.nextInt();
		} l[i] = in.nextInt() l[i] l i in.nextInt() in.nextInt in int cnt = 1; cnt 1 int sum = 0; sum 0 for ( int i = 0; i < n; i++ ) {			
			sum += l[i];
			if ( x < sum ) break;			
			cnt++;
		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {			
			sum += l[i];
			if ( x < sum ) break;			
			cnt++;
		} {			
			sum += l[i];
			if ( x < sum ) break;			
			cnt++;
		} sum += l[i] sum l[i] l i if ( x < sum ) break; x < sum x sum break; cnt++ cnt System.out.println(cnt) System.out.println System.out System System.out cnt in.close() in.close in String[] args args public class Main {
	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		int n = in.nextInt();
		int x = in.nextInt();

		int[] l = new int[n];
		for ( int i = 0; i < n; i++ ) {
			l[i] = in.nextInt();
		}

		int cnt = 1;
		int sum = 0;
		for ( int i = 0; i < n; i++ ) {			
			sum += l[i];
			if ( x < sum ) break;			
			cnt++;
		}

		System.out.println(cnt);
		in.close();
	}
} public class Main {
	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		int n = in.nextInt();
		int x = in.nextInt();

		int[] l = new int[n];
		for ( int i = 0; i < n; i++ ) {
			l[i] = in.nextInt();
		}

		int cnt = 1;
		int sum = 0;
		for ( int i = 0; i < n; i++ ) {			
			sum += l[i];
			if ( x < sum ) break;			
			cnt++;
		}

		System.out.println(cnt);
		in.close();
	}
} Main
import java.util.Scanner;
public class Main {
	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		int n = in.nextInt();
		int x = in.nextInt();

		int[] l = new int[n];
		for ( int i = 0; i < n; i++ ) {
			l[i] = in.nextInt();
		}

		int cnt = 1;
		int sum = 0;
		for ( int i = 0; i < n; i++ ) {			
			sum += l[i];
			if ( x < sum ) break;			
			cnt++;
		}

		System.out.println(cnt);
		in.close();
	}
}