

import java.util.Scanner;

public class Main{

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner sc = new Scanner(System.in);
		String line = sc.nextLine();
		String[] lines = line.split(" ");
		int N = Integer.parseInt(lines[0]);
		int X = Integer.parseInt(lines[1]);
		int[] L = new int[N];


		line = sc.nextLine();
		lines = line.split(" ");
		for(int i = 0 ; i < N ; i++) {
			L[i] = Integer.parseInt(lines[i]);
		}

		int count = 1;
		int D = 0;
		for(int i = 0 ; i < N ; i++) {
			D = D + L[i];
			if(D <= X) {
				count++;
			}
		}

		System.out.println(count);

	}

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

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner sc = new Scanner(System.in);
		String line = sc.nextLine();
		String[] lines = line.split(" ");
		int N = Integer.parseInt(lines[0]);
		int X = Integer.parseInt(lines[1]);
		int[] L = new int[N];


		line = sc.nextLine();
		lines = line.split(" ");
		for(int i = 0 ; i < N ; i++) {
			L[i] = Integer.parseInt(lines[i]);
		}

		int count = 1;
		int D = 0;
		for(int i = 0 ; i < N ; i++) {
			D = D + L[i];
			if(D <= X) {
				count++;
			}
		}

		System.out.println(count);

	}

} Main public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner sc = new Scanner(System.in);
		String line = sc.nextLine();
		String[] lines = line.split(" ");
		int N = Integer.parseInt(lines[0]);
		int X = Integer.parseInt(lines[1]);
		int[] L = new int[N];


		line = sc.nextLine();
		lines = line.split(" ");
		for(int i = 0 ; i < N ; i++) {
			L[i] = Integer.parseInt(lines[i]);
		}

		int count = 1;
		int D = 0;
		for(int i = 0 ; i < N ; i++) {
			D = D + L[i];
			if(D <= X) {
				count++;
			}
		}

		System.out.println(count);

	} main {
		// TODO 自動生成されたメソッド・スタブ
		Scanner sc = new Scanner(System.in);
		String line = sc.nextLine();
		String[] lines = line.split(" ");
		int N = Integer.parseInt(lines[0]);
		int X = Integer.parseInt(lines[1]);
		int[] L = new int[N];


		line = sc.nextLine();
		lines = line.split(" ");
		for(int i = 0 ; i < N ; i++) {
			L[i] = Integer.parseInt(lines[i]);
		}

		int count = 1;
		int D = 0;
		for(int i = 0 ; i < N ; i++) {
			D = D + L[i];
			if(D <= X) {
				count++;
			}
		}

		System.out.println(count);

	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String line = sc.nextLine(); line sc.nextLine() sc.nextLine sc String[] lines = line.split(" "); lines line.split(" ") line.split line " " int N = Integer.parseInt(lines[0]); N Integer.parseInt(lines[0]) Integer.parseInt Integer lines[0] lines 0 int X = Integer.parseInt(lines[1]); X Integer.parseInt(lines[1]) Integer.parseInt Integer lines[1] lines 1 int[] L = new int[N]; L new int[N] N line = sc.nextLine() line sc.nextLine() sc.nextLine sc lines = line.split(" ") lines line.split(" ") line.split line " " for(int i = 0 ; i < N ; i++) {
			L[i] = Integer.parseInt(lines[i]);
		} int i = 0 ; int i = 0 ; i 0 i < N i N i++ i++ i {
			L[i] = Integer.parseInt(lines[i]);
		} {
			L[i] = Integer.parseInt(lines[i]);
		} L[i] = Integer.parseInt(lines[i]) L[i] L i Integer.parseInt(lines[i]) Integer.parseInt Integer lines[i] lines i int count = 1; count 1 int D = 0; D 0 for(int i = 0 ; i < N ; i++) {
			D = D + L[i];
			if(D <= X) {
				count++;
			}
		} int i = 0 ; int i = 0 ; i 0 i < N i N i++ i++ i {
			D = D + L[i];
			if(D <= X) {
				count++;
			}
		} {
			D = D + L[i];
			if(D <= X) {
				count++;
			}
		} D = D + L[i] D D + L[i] D L[i] L i if(D <= X) {
				count++;
			} D <= X D X {
				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) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner sc = new Scanner(System.in);
		String line = sc.nextLine();
		String[] lines = line.split(" ");
		int N = Integer.parseInt(lines[0]);
		int X = Integer.parseInt(lines[1]);
		int[] L = new int[N];


		line = sc.nextLine();
		lines = line.split(" ");
		for(int i = 0 ; i < N ; i++) {
			L[i] = Integer.parseInt(lines[i]);
		}

		int count = 1;
		int D = 0;
		for(int i = 0 ; i < N ; i++) {
			D = D + L[i];
			if(D <= X) {
				count++;
			}
		}

		System.out.println(count);

	}

} public class Main{

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner sc = new Scanner(System.in);
		String line = sc.nextLine();
		String[] lines = line.split(" ");
		int N = Integer.parseInt(lines[0]);
		int X = Integer.parseInt(lines[1]);
		int[] L = new int[N];


		line = sc.nextLine();
		lines = line.split(" ");
		for(int i = 0 ; i < N ; i++) {
			L[i] = Integer.parseInt(lines[i]);
		}

		int count = 1;
		int D = 0;
		for(int i = 0 ; i < N ; i++) {
			D = D + L[i];
			if(D <= X) {
				count++;
			}
		}

		System.out.println(count);

	}

} Main


import java.util.Scanner;

public class Main{

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner sc = new Scanner(System.in);
		String line = sc.nextLine();
		String[] lines = line.split(" ");
		int N = Integer.parseInt(lines[0]);
		int X = Integer.parseInt(lines[1]);
		int[] L = new int[N];


		line = sc.nextLine();
		lines = line.split(" ");
		for(int i = 0 ; i < N ; i++) {
			L[i] = Integer.parseInt(lines[i]);
		}

		int count = 1;
		int D = 0;
		for(int i = 0 ; i < N ; i++) {
			D = D + L[i];
			if(D <= X) {
				count++;
			}
		}

		System.out.println(count);

	}

}
