
import java.util.Scanner;
public class Main {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int x = sc.nextInt();
		
		int []d = new int [n+1];
		d[0] = 0;
		int j;
		int bound = 1;
		for( j = 1; j <= n ; j++) {
			int l = sc.nextInt();
			d[j] = d[j - 1] + l;
			if (d[j] <= x) 
				bound++;
			else {
				break;
			}
		
		}
		System.out.println(bound);

	}

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

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int x = sc.nextInt();
		
		int []d = new int [n+1];
		d[0] = 0;
		int j;
		int bound = 1;
		for( j = 1; j <= n ; j++) {
			int l = sc.nextInt();
			d[j] = d[j - 1] + l;
			if (d[j] <= x) 
				bound++;
			else {
				break;
			}
		
		}
		System.out.println(bound);

	}

} Main public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int x = sc.nextInt();
		
		int []d = new int [n+1];
		d[0] = 0;
		int j;
		int bound = 1;
		for( j = 1; j <= n ; j++) {
			int l = sc.nextInt();
			d[j] = d[j - 1] + l;
			if (d[j] <= x) 
				bound++;
			else {
				break;
			}
		
		}
		System.out.println(bound);

	} main {
		// TODO 自動生成されたメソッド・スタブ
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int x = sc.nextInt();
		
		int []d = new int [n+1];
		d[0] = 0;
		int j;
		int bound = 1;
		for( j = 1; j <= n ; j++) {
			int l = sc.nextInt();
			d[j] = d[j - 1] + l;
			if (d[j] <= x) 
				bound++;
			else {
				break;
			}
		
		}
		System.out.println(bound);

	} 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 []d = new int [n+1]; d new int [n+1] n+1 n 1 d[0] = 0 d[0] d 0 0 int j; j int bound = 1; bound 1 for( j = 1; j <= n ; j++) {
			int l = sc.nextInt();
			d[j] = d[j - 1] + l;
			if (d[j] <= x) 
				bound++;
			else {
				break;
			}
		
		} j = 1; j = 1 j 1 j <= n j n j++ j++ j {
			int l = sc.nextInt();
			d[j] = d[j - 1] + l;
			if (d[j] <= x) 
				bound++;
			else {
				break;
			}
		
		} {
			int l = sc.nextInt();
			d[j] = d[j - 1] + l;
			if (d[j] <= x) 
				bound++;
			else {
				break;
			}
		
		} int l = sc.nextInt(); l sc.nextInt() sc.nextInt sc d[j] = d[j - 1] + l d[j] d j d[j - 1] + l d[j - 1] d j - 1 j 1 l if (d[j] <= x) 
				bound++;
			else {
				break;
			} d[j] <= x d[j] d j x bound++ bound {
				break;
			} break; System.out.println(bound) System.out.println System.out System System.out bound String[] args args public class Main {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int x = sc.nextInt();
		
		int []d = new int [n+1];
		d[0] = 0;
		int j;
		int bound = 1;
		for( j = 1; j <= n ; j++) {
			int l = sc.nextInt();
			d[j] = d[j - 1] + l;
			if (d[j] <= x) 
				bound++;
			else {
				break;
			}
		
		}
		System.out.println(bound);

	}

} public class Main {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int x = sc.nextInt();
		
		int []d = new int [n+1];
		d[0] = 0;
		int j;
		int bound = 1;
		for( j = 1; j <= n ; j++) {
			int l = sc.nextInt();
			d[j] = d[j - 1] + l;
			if (d[j] <= x) 
				bound++;
			else {
				break;
			}
		
		}
		System.out.println(bound);

	}

} Main

import java.util.Scanner;
public class Main {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int x = sc.nextInt();
		
		int []d = new int [n+1];
		d[0] = 0;
		int j;
		int bound = 1;
		for( j = 1; j <= n ; j++) {
			int l = sc.nextInt();
			d[j] = d[j - 1] + l;
			if (d[j] <= x) 
				bound++;
			else {
				break;
			}
		
		}
		System.out.println(bound);

	}

}
