import java.util.Scanner;

public class Main {
	private static Scanner sc;

	public static void main(String[] args) throws Exception {
		sc = new Scanner(System.in);
		int N = sc.nextInt();
		int X = sc.nextInt();

		int[] L = new int[N];

		for (int i = 0; i < N; i++) {
			L[i] = sc.nextInt();
		}

		int now = 0;
		int ans = 1;

		for (int i = 0; i < N; i++) {
			now += L[i];
			if (now > X) {
				break;
			}
			ans++;
		}

		System.out.println(ans);

	}
} import java.util.Scanner; Scanner java.util public class Main {
	private static Scanner sc;

	public static void main(String[] args) throws Exception {
		sc = new Scanner(System.in);
		int N = sc.nextInt();
		int X = sc.nextInt();

		int[] L = new int[N];

		for (int i = 0; i < N; i++) {
			L[i] = sc.nextInt();
		}

		int now = 0;
		int ans = 1;

		for (int i = 0; i < N; i++) {
			now += L[i];
			if (now > X) {
				break;
			}
			ans++;
		}

		System.out.println(ans);

	}
} Main private static Scanner sc; sc public static void main(String[] args) throws Exception {
		sc = new Scanner(System.in);
		int N = sc.nextInt();
		int X = sc.nextInt();

		int[] L = new int[N];

		for (int i = 0; i < N; i++) {
			L[i] = sc.nextInt();
		}

		int now = 0;
		int ans = 1;

		for (int i = 0; i < N; i++) {
			now += L[i];
			if (now > X) {
				break;
			}
			ans++;
		}

		System.out.println(ans);

	} main {
		sc = new Scanner(System.in);
		int N = sc.nextInt();
		int X = sc.nextInt();

		int[] L = new int[N];

		for (int i = 0; i < N; i++) {
			L[i] = sc.nextInt();
		}

		int now = 0;
		int ans = 1;

		for (int i = 0; i < N; i++) {
			now += L[i];
			if (now > X) {
				break;
			}
			ans++;
		}

		System.out.println(ans);

	} 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[] L = new int[N]; L new int[N] N for (int i = 0; i < N; i++) {
			L[i] = sc.nextInt();
		} int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
			L[i] = sc.nextInt();
		} {
			L[i] = sc.nextInt();
		} L[i] = sc.nextInt() L[i] L i sc.nextInt() sc.nextInt sc int now = 0; now 0 int ans = 1; ans 1 for (int i = 0; i < N; i++) {
			now += L[i];
			if (now > X) {
				break;
			}
			ans++;
		} int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
			now += L[i];
			if (now > X) {
				break;
			}
			ans++;
		} {
			now += L[i];
			if (now > X) {
				break;
			}
			ans++;
		} now += L[i] now L[i] L i if (now > X) {
				break;
			} now > X now X {
				break;
			} break; ans++ ans System.out.println(ans) System.out.println System.out System System.out ans String[] args args public class Main {
	private static Scanner sc;

	public static void main(String[] args) throws Exception {
		sc = new Scanner(System.in);
		int N = sc.nextInt();
		int X = sc.nextInt();

		int[] L = new int[N];

		for (int i = 0; i < N; i++) {
			L[i] = sc.nextInt();
		}

		int now = 0;
		int ans = 1;

		for (int i = 0; i < N; i++) {
			now += L[i];
			if (now > X) {
				break;
			}
			ans++;
		}

		System.out.println(ans);

	}
} public class Main {
	private static Scanner sc;

	public static void main(String[] args) throws Exception {
		sc = new Scanner(System.in);
		int N = sc.nextInt();
		int X = sc.nextInt();

		int[] L = new int[N];

		for (int i = 0; i < N; i++) {
			L[i] = sc.nextInt();
		}

		int now = 0;
		int ans = 1;

		for (int i = 0; i < N; i++) {
			now += L[i];
			if (now > X) {
				break;
			}
			ans++;
		}

		System.out.println(ans);

	}
} Main
import java.util.Scanner;

public class Main {
	private static Scanner sc;

	public static void main(String[] args) throws Exception {
		sc = new Scanner(System.in);
		int N = sc.nextInt();
		int X = sc.nextInt();

		int[] L = new int[N];

		for (int i = 0; i < N; i++) {
			L[i] = sc.nextInt();
		}

		int now = 0;
		int ans = 1;

		for (int i = 0; i < N; i++) {
			now += L[i];
			if (now > X) {
				break;
			}
			ans++;
		}

		System.out.println(ans);

	}
}
