/*
	submission # - User: herp_sy
	https://atcoder.jp/contests/
*/

import java.util.*;
import java.io.*;
import static java.lang.System.*;

public class Main{
	public static void main(String[] args){
		int n,x;
		int cnt = 1;
		Scanner sc = new Scanner(in);
		ArrayList<Integer> l = new ArrayList<Integer>();
		ArrayList<Integer> d = new ArrayList<Integer>();
		n = sc.nextInt();
		x = sc.nextInt();
		d.add(0);
		for (int i = 1; i <= n; ++i){
			l.add(sc.nextInt());
			d.add(d.get(i - 1) + l.get(i - 1));
			if(d.get(i) <= x){
				++cnt;
			}
			// out.println(d.get(i));
		}
		out.println(cnt);
	}
} import java.util.*; util.* java import java.io.*; io.* java import static java.lang.System.*; import static java.lang.System.*; import static java.lang.System.*; public class Main{
	public static void main(String[] args){
		int n,x;
		int cnt = 1;
		Scanner sc = new Scanner(in);
		ArrayList<Integer> l = new ArrayList<Integer>();
		ArrayList<Integer> d = new ArrayList<Integer>();
		n = sc.nextInt();
		x = sc.nextInt();
		d.add(0);
		for (int i = 1; i <= n; ++i){
			l.add(sc.nextInt());
			d.add(d.get(i - 1) + l.get(i - 1));
			if(d.get(i) <= x){
				++cnt;
			}
			// out.println(d.get(i));
		}
		out.println(cnt);
	}
} Main public static void main(String[] args){
		int n,x;
		int cnt = 1;
		Scanner sc = new Scanner(in);
		ArrayList<Integer> l = new ArrayList<Integer>();
		ArrayList<Integer> d = new ArrayList<Integer>();
		n = sc.nextInt();
		x = sc.nextInt();
		d.add(0);
		for (int i = 1; i <= n; ++i){
			l.add(sc.nextInt());
			d.add(d.get(i - 1) + l.get(i - 1));
			if(d.get(i) <= x){
				++cnt;
			}
			// out.println(d.get(i));
		}
		out.println(cnt);
	} main {
		int n,x;
		int cnt = 1;
		Scanner sc = new Scanner(in);
		ArrayList<Integer> l = new ArrayList<Integer>();
		ArrayList<Integer> d = new ArrayList<Integer>();
		n = sc.nextInt();
		x = sc.nextInt();
		d.add(0);
		for (int i = 1; i <= n; ++i){
			l.add(sc.nextInt());
			d.add(d.get(i - 1) + l.get(i - 1));
			if(d.get(i) <= x){
				++cnt;
			}
			// out.println(d.get(i));
		}
		out.println(cnt);
	} int n n x; x int cnt = 1; cnt 1 Scanner sc = new Scanner(in); sc new Scanner(in) ArrayList<Integer> l = new ArrayList<Integer>(); l new ArrayList<Integer>() ArrayList<Integer> d = new ArrayList<Integer>(); d new ArrayList<Integer>() n = sc.nextInt() n sc.nextInt() sc.nextInt sc x = sc.nextInt() x sc.nextInt() sc.nextInt sc d.add(0) d.add d 0 for (int i = 1; i <= n; ++i){
			l.add(sc.nextInt());
			d.add(d.get(i - 1) + l.get(i - 1));
			if(d.get(i) <= x){
				++cnt;
			}
			// out.println(d.get(i));
		} int i = 1; int i = 1; i 1 i <= n i n ++i ++i i {
			l.add(sc.nextInt());
			d.add(d.get(i - 1) + l.get(i - 1));
			if(d.get(i) <= x){
				++cnt;
			}
			// out.println(d.get(i));
		} {
			l.add(sc.nextInt());
			d.add(d.get(i - 1) + l.get(i - 1));
			if(d.get(i) <= x){
				++cnt;
			}
			// out.println(d.get(i));
		} l.add(sc.nextInt()) l.add l sc.nextInt() sc.nextInt sc d.add(d.get(i - 1) + l.get(i - 1)) d.add d d.get(i - 1) + l.get(i - 1) d.get(i - 1) d.get d i - 1 i 1 l.get(i - 1) l.get l i - 1 i 1 if(d.get(i) <= x){
				++cnt;
			} d.get(i) <= x d.get(i) d.get d i x {
				++cnt;
			} ++cnt cnt out.println(cnt) out.println out cnt String[] args args public class Main{
	public static void main(String[] args){
		int n,x;
		int cnt = 1;
		Scanner sc = new Scanner(in);
		ArrayList<Integer> l = new ArrayList<Integer>();
		ArrayList<Integer> d = new ArrayList<Integer>();
		n = sc.nextInt();
		x = sc.nextInt();
		d.add(0);
		for (int i = 1; i <= n; ++i){
			l.add(sc.nextInt());
			d.add(d.get(i - 1) + l.get(i - 1));
			if(d.get(i) <= x){
				++cnt;
			}
			// out.println(d.get(i));
		}
		out.println(cnt);
	}
} public class Main{
	public static void main(String[] args){
		int n,x;
		int cnt = 1;
		Scanner sc = new Scanner(in);
		ArrayList<Integer> l = new ArrayList<Integer>();
		ArrayList<Integer> d = new ArrayList<Integer>();
		n = sc.nextInt();
		x = sc.nextInt();
		d.add(0);
		for (int i = 1; i <= n; ++i){
			l.add(sc.nextInt());
			d.add(d.get(i - 1) + l.get(i - 1));
			if(d.get(i) <= x){
				++cnt;
			}
			// out.println(d.get(i));
		}
		out.println(cnt);
	}
} Main
/*
	submission # - User: herp_sy
	https://atcoder.jp/contests/
*/

import java.util.*;
import java.io.*;
import static java.lang.System.*;

public class Main{
	public static void main(String[] args){
		int n,x;
		int cnt = 1;
		Scanner sc = new Scanner(in);
		ArrayList<Integer> l = new ArrayList<Integer>();
		ArrayList<Integer> d = new ArrayList<Integer>();
		n = sc.nextInt();
		x = sc.nextInt();
		d.add(0);
		for (int i = 1; i <= n; ++i){
			l.add(sc.nextInt());
			d.add(d.get(i - 1) + l.get(i - 1));
			if(d.get(i) <= x){
				++cnt;
			}
			// out.println(d.get(i));
		}
		out.println(cnt);
	}
}
