import java.util.Scanner;
public class Main {
		static void solve() {
			Scanner sc = new Scanner(System.in);
			int n = sc.nextInt();
			int x = sc.nextInt();
			int sum = 0;
			int res = 0;
			int[] array = new int [n];
			for(int i = 0;i<n;i++) {
				int l = sc.nextInt();
				sum+=l;
				if(sum<=x) {
					res++;
				}
			}
			System.out.println(res+1);
			sc.close();
		}
		public static void main(String[] args) {
			solve();

	}

} import java.util.Scanner; Scanner java.util public class Main {
		static void solve() {
			Scanner sc = new Scanner(System.in);
			int n = sc.nextInt();
			int x = sc.nextInt();
			int sum = 0;
			int res = 0;
			int[] array = new int [n];
			for(int i = 0;i<n;i++) {
				int l = sc.nextInt();
				sum+=l;
				if(sum<=x) {
					res++;
				}
			}
			System.out.println(res+1);
			sc.close();
		}
		public static void main(String[] args) {
			solve();

	}

} Main static void solve() {
			Scanner sc = new Scanner(System.in);
			int n = sc.nextInt();
			int x = sc.nextInt();
			int sum = 0;
			int res = 0;
			int[] array = new int [n];
			for(int i = 0;i<n;i++) {
				int l = sc.nextInt();
				sum+=l;
				if(sum<=x) {
					res++;
				}
			}
			System.out.println(res+1);
			sc.close();
		} solve {
			Scanner sc = new Scanner(System.in);
			int n = sc.nextInt();
			int x = sc.nextInt();
			int sum = 0;
			int res = 0;
			int[] array = new int [n];
			for(int i = 0;i<n;i++) {
				int l = sc.nextInt();
				sum+=l;
				if(sum<=x) {
					res++;
				}
			}
			System.out.println(res+1);
			sc.close();
		} 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 sum = 0; sum 0 int res = 0; res 0 int[] array = new int [n]; array new int [n] n for(int i = 0;i<n;i++) {
				int l = sc.nextInt();
				sum+=l;
				if(sum<=x) {
					res++;
				}
			} int i = 0; int i = 0; i 0 i<n i n i++ i++ i {
				int l = sc.nextInt();
				sum+=l;
				if(sum<=x) {
					res++;
				}
			} {
				int l = sc.nextInt();
				sum+=l;
				if(sum<=x) {
					res++;
				}
			} int l = sc.nextInt(); l sc.nextInt() sc.nextInt sc sum+=l sum l if(sum<=x) {
					res++;
				} sum<=x sum x {
					res++;
				} res++ res System.out.println(res+1) System.out.println System.out System System.out res+1 res 1 sc.close() sc.close sc public static void main(String[] args) {
			solve();

	} main {
			solve();

	} solve() solve String[] args args public class Main {
		static void solve() {
			Scanner sc = new Scanner(System.in);
			int n = sc.nextInt();
			int x = sc.nextInt();
			int sum = 0;
			int res = 0;
			int[] array = new int [n];
			for(int i = 0;i<n;i++) {
				int l = sc.nextInt();
				sum+=l;
				if(sum<=x) {
					res++;
				}
			}
			System.out.println(res+1);
			sc.close();
		}
		public static void main(String[] args) {
			solve();

	}

} public class Main {
		static void solve() {
			Scanner sc = new Scanner(System.in);
			int n = sc.nextInt();
			int x = sc.nextInt();
			int sum = 0;
			int res = 0;
			int[] array = new int [n];
			for(int i = 0;i<n;i++) {
				int l = sc.nextInt();
				sum+=l;
				if(sum<=x) {
					res++;
				}
			}
			System.out.println(res+1);
			sc.close();
		}
		public static void main(String[] args) {
			solve();

	}

} Main
import java.util.Scanner;
public class Main {
		static void solve() {
			Scanner sc = new Scanner(System.in);
			int n = sc.nextInt();
			int x = sc.nextInt();
			int sum = 0;
			int res = 0;
			int[] array = new int [n];
			for(int i = 0;i<n;i++) {
				int l = sc.nextInt();
				sum+=l;
				if(sum<=x) {
					res++;
				}
			}
			System.out.println(res+1);
			sc.close();
		}
		public static void main(String[] args) {
			solve();

	}

}
