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