import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		int n = Integer.parseInt(sc.next());
		int x = Integer.parseInt(sc.next());

		int bounce = 1;
		int height = 0;

		for (int i = 0; i < n; i++) {
			height += Integer.parseInt(sc.next());
			if(height > x) {
				break;
			}
			bounce++;
		}

		System.out.println(bounce);

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

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		int n = Integer.parseInt(sc.next());
		int x = Integer.parseInt(sc.next());

		int bounce = 1;
		int height = 0;

		for (int i = 0; i < n; i++) {
			height += Integer.parseInt(sc.next());
			if(height > x) {
				break;
			}
			bounce++;
		}

		System.out.println(bounce);

	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		int n = Integer.parseInt(sc.next());
		int x = Integer.parseInt(sc.next());

		int bounce = 1;
		int height = 0;

		for (int i = 0; i < n; i++) {
			height += Integer.parseInt(sc.next());
			if(height > x) {
				break;
			}
			bounce++;
		}

		System.out.println(bounce);

	} main {
		Scanner sc = new Scanner(System.in);

		int n = Integer.parseInt(sc.next());
		int x = Integer.parseInt(sc.next());

		int bounce = 1;
		int height = 0;

		for (int i = 0; i < n; i++) {
			height += Integer.parseInt(sc.next());
			if(height > x) {
				break;
			}
			bounce++;
		}

		System.out.println(bounce);

	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = Integer.parseInt(sc.next()); n Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc int x = Integer.parseInt(sc.next()); x Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc int bounce = 1; bounce 1 int height = 0; height 0 for (int i = 0; i < n; i++) {
			height += Integer.parseInt(sc.next());
			if(height > x) {
				break;
			}
			bounce++;
		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
			height += Integer.parseInt(sc.next());
			if(height > x) {
				break;
			}
			bounce++;
		} {
			height += Integer.parseInt(sc.next());
			if(height > x) {
				break;
			}
			bounce++;
		} height += Integer.parseInt(sc.next()) height Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc if(height > x) {
				break;
			} height > x height x {
				break;
			} break; bounce++ bounce System.out.println(bounce) System.out.println System.out System System.out bounce String[] args args public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		int n = Integer.parseInt(sc.next());
		int x = Integer.parseInt(sc.next());

		int bounce = 1;
		int height = 0;

		for (int i = 0; i < n; i++) {
			height += Integer.parseInt(sc.next());
			if(height > x) {
				break;
			}
			bounce++;
		}

		System.out.println(bounce);

	}
} public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		int n = Integer.parseInt(sc.next());
		int x = Integer.parseInt(sc.next());

		int bounce = 1;
		int height = 0;

		for (int i = 0; i < n; i++) {
			height += Integer.parseInt(sc.next());
			if(height > x) {
				break;
			}
			bounce++;
		}

		System.out.println(bounce);

	}
} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		int n = Integer.parseInt(sc.next());
		int x = Integer.parseInt(sc.next());

		int bounce = 1;
		int height = 0;

		for (int i = 0; i < n; i++) {
			height += Integer.parseInt(sc.next());
			if(height > x) {
				break;
			}
			bounce++;
		}

		System.out.println(bounce);

	}
}