import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		
		int N = scan.nextInt();
		int X = scan.nextInt();
		
		int counter = 1;
		double sum = 0;
		
		for (int count = 0; count < N; count++) {
			int input = scan.nextInt();
			sum += input;
			if(sum <= X) {
				counter++;
			}
		}
		System.out.println(counter);
	}
} import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		
		int N = scan.nextInt();
		int X = scan.nextInt();
		
		int counter = 1;
		double sum = 0;
		
		for (int count = 0; count < N; count++) {
			int input = scan.nextInt();
			sum += input;
			if(sum <= X) {
				counter++;
			}
		}
		System.out.println(counter);
	}
} Main public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		
		int N = scan.nextInt();
		int X = scan.nextInt();
		
		int counter = 1;
		double sum = 0;
		
		for (int count = 0; count < N; count++) {
			int input = scan.nextInt();
			sum += input;
			if(sum <= X) {
				counter++;
			}
		}
		System.out.println(counter);
	} main {
		Scanner scan = new Scanner(System.in);
		
		int N = scan.nextInt();
		int X = scan.nextInt();
		
		int counter = 1;
		double sum = 0;
		
		for (int count = 0; count < N; count++) {
			int input = scan.nextInt();
			sum += input;
			if(sum <= X) {
				counter++;
			}
		}
		System.out.println(counter);
	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int N = scan.nextInt(); N scan.nextInt() scan.nextInt scan int X = scan.nextInt(); X scan.nextInt() scan.nextInt scan int counter = 1; counter 1 double sum = 0; sum 0 for (int count = 0; count < N; count++) {
			int input = scan.nextInt();
			sum += input;
			if(sum <= X) {
				counter++;
			}
		} int count = 0; int count = 0; count 0 count < N count N count++ count++ count {
			int input = scan.nextInt();
			sum += input;
			if(sum <= X) {
				counter++;
			}
		} {
			int input = scan.nextInt();
			sum += input;
			if(sum <= X) {
				counter++;
			}
		} int input = scan.nextInt(); input scan.nextInt() scan.nextInt scan sum += input sum input if(sum <= X) {
				counter++;
			} sum <= X sum X {
				counter++;
			} counter++ counter System.out.println(counter) System.out.println System.out System System.out counter String[] args args public class Main {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		
		int N = scan.nextInt();
		int X = scan.nextInt();
		
		int counter = 1;
		double sum = 0;
		
		for (int count = 0; count < N; count++) {
			int input = scan.nextInt();
			sum += input;
			if(sum <= X) {
				counter++;
			}
		}
		System.out.println(counter);
	}
} public class Main {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		
		int N = scan.nextInt();
		int X = scan.nextInt();
		
		int counter = 1;
		double sum = 0;
		
		for (int count = 0; count < N; count++) {
			int input = scan.nextInt();
			sum += input;
			if(sum <= X) {
				counter++;
			}
		}
		System.out.println(counter);
	}
} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		
		int N = scan.nextInt();
		int X = scan.nextInt();
		
		int counter = 1;
		double sum = 0;
		
		for (int count = 0; count < N; count++) {
			int input = scan.nextInt();
			sum += input;
			if(sum <= X) {
				counter++;
			}
		}
		System.out.println(counter);
	}
}
