import java.util.Scanner;

public class Main{

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String[] temp = sc.nextLine().split(" ");
		int n = Integer.parseInt(temp[0]);
		int x = Integer.parseInt(temp[1]);

		String[] tmp = sc.nextLine().split(" ");

		int ans = 0;
		int count = 1;
		for(int i = 0; i < tmp.length; i++) {

			ans += Integer.parseInt(tmp[i]);

			if(ans > x) {

				break;

			}

			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);
		String[] temp = sc.nextLine().split(" ");
		int n = Integer.parseInt(temp[0]);
		int x = Integer.parseInt(temp[1]);

		String[] tmp = sc.nextLine().split(" ");

		int ans = 0;
		int count = 1;
		for(int i = 0; i < tmp.length; i++) {

			ans += Integer.parseInt(tmp[i]);

			if(ans > x) {

				break;

			}

			count++;

		}

		System.out.println(count);


	}

} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String[] temp = sc.nextLine().split(" ");
		int n = Integer.parseInt(temp[0]);
		int x = Integer.parseInt(temp[1]);

		String[] tmp = sc.nextLine().split(" ");

		int ans = 0;
		int count = 1;
		for(int i = 0; i < tmp.length; i++) {

			ans += Integer.parseInt(tmp[i]);

			if(ans > x) {

				break;

			}

			count++;

		}

		System.out.println(count);


	} main {
		Scanner sc = new Scanner(System.in);
		String[] temp = sc.nextLine().split(" ");
		int n = Integer.parseInt(temp[0]);
		int x = Integer.parseInt(temp[1]);

		String[] tmp = sc.nextLine().split(" ");

		int ans = 0;
		int count = 1;
		for(int i = 0; i < tmp.length; i++) {

			ans += Integer.parseInt(tmp[i]);

			if(ans > x) {

				break;

			}

			count++;

		}

		System.out.println(count);


	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String[] temp = sc.nextLine().split(" "); temp sc.nextLine().split(" ") sc.nextLine().split sc.nextLine() sc.nextLine sc " " int n = Integer.parseInt(temp[0]); n Integer.parseInt(temp[0]) Integer.parseInt Integer temp[0] temp 0 int x = Integer.parseInt(temp[1]); x Integer.parseInt(temp[1]) Integer.parseInt Integer temp[1] temp 1 String[] tmp = sc.nextLine().split(" "); tmp sc.nextLine().split(" ") sc.nextLine().split sc.nextLine() sc.nextLine sc " " int ans = 0; ans 0 int count = 1; count 1 for(int i = 0; i < tmp.length; i++) {

			ans += Integer.parseInt(tmp[i]);

			if(ans > x) {

				break;

			}

			count++;

		} int i = 0; int i = 0; i 0 i < tmp.length i tmp.length tmp tmp.length i++ i++ i {

			ans += Integer.parseInt(tmp[i]);

			if(ans > x) {

				break;

			}

			count++;

		} {

			ans += Integer.parseInt(tmp[i]);

			if(ans > x) {

				break;

			}

			count++;

		} ans += Integer.parseInt(tmp[i]) ans Integer.parseInt(tmp[i]) Integer.parseInt Integer tmp[i] tmp i if(ans > x) {

				break;

			} ans > x ans x {

				break;

			} break; 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);
		String[] temp = sc.nextLine().split(" ");
		int n = Integer.parseInt(temp[0]);
		int x = Integer.parseInt(temp[1]);

		String[] tmp = sc.nextLine().split(" ");

		int ans = 0;
		int count = 1;
		for(int i = 0; i < tmp.length; i++) {

			ans += Integer.parseInt(tmp[i]);

			if(ans > x) {

				break;

			}

			count++;

		}

		System.out.println(count);


	}

} public class Main{

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String[] temp = sc.nextLine().split(" ");
		int n = Integer.parseInt(temp[0]);
		int x = Integer.parseInt(temp[1]);

		String[] tmp = sc.nextLine().split(" ");

		int ans = 0;
		int count = 1;
		for(int i = 0; i < tmp.length; i++) {

			ans += Integer.parseInt(tmp[i]);

			if(ans > x) {

				break;

			}

			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);
		String[] temp = sc.nextLine().split(" ");
		int n = Integer.parseInt(temp[0]);
		int x = Integer.parseInt(temp[1]);

		String[] tmp = sc.nextLine().split(" ");

		int ans = 0;
		int count = 1;
		for(int i = 0; i < tmp.length; i++) {

			ans += Integer.parseInt(tmp[i]);

			if(ans > x) {

				break;

			}

			count++;

		}

		System.out.println(count);


	}

}
