import java.util.*;
import java.io.*;
public class Main {

	public static void main(String[] args) throws Exception {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		StringTokenizer st = new StringTokenizer(br.readLine());
		int n = Integer.parseInt(st.nextToken());
		long x = Long.parseLong(st.nextToken());
		int[] arr = new int[n];
		st = new StringTokenizer(br.readLine());
		for(int i = 0; i < n; i++){
			arr[i] = Integer.parseInt(st.nextToken());
		}
		int curr = 0; int count = 1;
		for(int i = 0; i < n; i++){
			curr += arr[i];
			if(curr <= x) count++;
		}
		System.out.println(count);
	}

} import java.util.*; util.* java import java.io.*; io.* java public class Main {

	public static void main(String[] args) throws Exception {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		StringTokenizer st = new StringTokenizer(br.readLine());
		int n = Integer.parseInt(st.nextToken());
		long x = Long.parseLong(st.nextToken());
		int[] arr = new int[n];
		st = new StringTokenizer(br.readLine());
		for(int i = 0; i < n; i++){
			arr[i] = Integer.parseInt(st.nextToken());
		}
		int curr = 0; int count = 1;
		for(int i = 0; i < n; i++){
			curr += arr[i];
			if(curr <= x) count++;
		}
		System.out.println(count);
	}

} Main public static void main(String[] args) throws Exception {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		StringTokenizer st = new StringTokenizer(br.readLine());
		int n = Integer.parseInt(st.nextToken());
		long x = Long.parseLong(st.nextToken());
		int[] arr = new int[n];
		st = new StringTokenizer(br.readLine());
		for(int i = 0; i < n; i++){
			arr[i] = Integer.parseInt(st.nextToken());
		}
		int curr = 0; int count = 1;
		for(int i = 0; i < n; i++){
			curr += arr[i];
			if(curr <= x) count++;
		}
		System.out.println(count);
	} main {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		StringTokenizer st = new StringTokenizer(br.readLine());
		int n = Integer.parseInt(st.nextToken());
		long x = Long.parseLong(st.nextToken());
		int[] arr = new int[n];
		st = new StringTokenizer(br.readLine());
		for(int i = 0; i < n; i++){
			arr[i] = Integer.parseInt(st.nextToken());
		}
		int curr = 0; int count = 1;
		for(int i = 0; i < n; i++){
			curr += arr[i];
			if(curr <= x) count++;
		}
		System.out.println(count);
	} BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) StringTokenizer st = new StringTokenizer(br.readLine()); st new StringTokenizer(br.readLine()) int n = Integer.parseInt(st.nextToken()); n Integer.parseInt(st.nextToken()) Integer.parseInt Integer st.nextToken() st.nextToken st long x = Long.parseLong(st.nextToken()); x Long.parseLong(st.nextToken()) Long.parseLong Long st.nextToken() st.nextToken st int[] arr = new int[n]; arr new int[n] n st = new StringTokenizer(br.readLine()) st new StringTokenizer(br.readLine()) for(int i = 0; i < n; i++){
			arr[i] = Integer.parseInt(st.nextToken());
		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
			arr[i] = Integer.parseInt(st.nextToken());
		} {
			arr[i] = Integer.parseInt(st.nextToken());
		} arr[i] = Integer.parseInt(st.nextToken()) arr[i] arr i Integer.parseInt(st.nextToken()) Integer.parseInt Integer st.nextToken() st.nextToken st int curr = 0; curr 0 int count = 1; count 1 for(int i = 0; i < n; i++){
			curr += arr[i];
			if(curr <= x) count++;
		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
			curr += arr[i];
			if(curr <= x) count++;
		} {
			curr += arr[i];
			if(curr <= x) count++;
		} curr += arr[i] curr arr[i] arr i if(curr <= x) count++; curr <= x curr x 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) throws Exception {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		StringTokenizer st = new StringTokenizer(br.readLine());
		int n = Integer.parseInt(st.nextToken());
		long x = Long.parseLong(st.nextToken());
		int[] arr = new int[n];
		st = new StringTokenizer(br.readLine());
		for(int i = 0; i < n; i++){
			arr[i] = Integer.parseInt(st.nextToken());
		}
		int curr = 0; int count = 1;
		for(int i = 0; i < n; i++){
			curr += arr[i];
			if(curr <= x) count++;
		}
		System.out.println(count);
	}

} public class Main {

	public static void main(String[] args) throws Exception {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		StringTokenizer st = new StringTokenizer(br.readLine());
		int n = Integer.parseInt(st.nextToken());
		long x = Long.parseLong(st.nextToken());
		int[] arr = new int[n];
		st = new StringTokenizer(br.readLine());
		for(int i = 0; i < n; i++){
			arr[i] = Integer.parseInt(st.nextToken());
		}
		int curr = 0; int count = 1;
		for(int i = 0; i < n; i++){
			curr += arr[i];
			if(curr <= x) count++;
		}
		System.out.println(count);
	}

} Main
import java.util.*;
import java.io.*;
public class Main {

	public static void main(String[] args) throws Exception {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		StringTokenizer st = new StringTokenizer(br.readLine());
		int n = Integer.parseInt(st.nextToken());
		long x = Long.parseLong(st.nextToken());
		int[] arr = new int[n];
		st = new StringTokenizer(br.readLine());
		for(int i = 0; i < n; i++){
			arr[i] = Integer.parseInt(st.nextToken());
		}
		int curr = 0; int count = 1;
		for(int i = 0; i < n; i++){
			curr += arr[i];
			if(curr <= x) count++;
		}
		System.out.println(count);
	}

}
