
import java.util.*;

public class Main {
	public static void main(String[] args) {
		Main main = new Main();
		main.run();
	}

	public void run() {
		Scanner sc = new Scanner(System.in);
		int n=sc.nextInt();
		int x=sc.nextInt();

		int cnt = 1;
		int sum=0;

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

	public void run() {
		Scanner sc = new Scanner(System.in);
		int n=sc.nextInt();
		int x=sc.nextInt();

		int cnt = 1;
		int sum=0;

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

		int cnt = 1;
		int sum=0;

		for(int i=0; i<n; i++) {
			int l=sc.nextInt();
			sum += l;
			if(sum<=x) {
				cnt++;
			}
		}
		System.out.println(cnt);
		sc.close();
	} run {
		Scanner sc = new Scanner(System.in);
		int n=sc.nextInt();
		int x=sc.nextInt();

		int cnt = 1;
		int sum=0;

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

	public void run() {
		Scanner sc = new Scanner(System.in);
		int n=sc.nextInt();
		int x=sc.nextInt();

		int cnt = 1;
		int sum=0;

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

	public void run() {
		Scanner sc = new Scanner(System.in);
		int n=sc.nextInt();
		int x=sc.nextInt();

		int cnt = 1;
		int sum=0;

		for(int i=0; i<n; i++) {
			int l=sc.nextInt();
			sum += l;
			if(sum<=x) {
				cnt++;
			}
		}
		System.out.println(cnt);
		sc.close();
	}
} Main

import java.util.*;

public class Main {
	public static void main(String[] args) {
		Main main = new Main();
		main.run();
	}

	public void run() {
		Scanner sc = new Scanner(System.in);
		int n=sc.nextInt();
		int x=sc.nextInt();

		int cnt = 1;
		int sum=0;

		for(int i=0; i<n; i++) {
			int l=sc.nextInt();
			sum += l;
			if(sum<=x) {
				cnt++;
			}
		}
		System.out.println(cnt);
		sc.close();
	}
}
