import java.util.Scanner;
public class Main {

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

} import java.util.Scanner; Scanner java.util public class Main {

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

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

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

} public class Main {

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

} Main
import java.util.Scanner;
public class Main {

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

}
