import java.util.*;

public class Main {
	public static void main(String[] args) {
		Scanner 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();
		}
		sc.close();

		int cnt = 0; // 1回目は必ず含む
		int x = 0;
		while (true) {
			if (cnt >= N) {
				break;
			}

			if (x + L[cnt] <= X) {
				x = x + L[cnt];
				cnt++;
			} else {
				break;
			}
		}
		System.out.println(cnt + 1);
	}
} import java.util.*; util.* java public class Main {
	public static void main(String[] args) {
		Scanner 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();
		}
		sc.close();

		int cnt = 0; // 1回目は必ず含む
		int x = 0;
		while (true) {
			if (cnt >= N) {
				break;
			}

			if (x + L[cnt] <= X) {
				x = x + L[cnt];
				cnt++;
			} else {
				break;
			}
		}
		System.out.println(cnt + 1);
	}
} Main public static void main(String[] args) {
		Scanner 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();
		}
		sc.close();

		int cnt = 0; // 1回目は必ず含む
		int x = 0;
		while (true) {
			if (cnt >= N) {
				break;
			}

			if (x + L[cnt] <= X) {
				x = x + L[cnt];
				cnt++;
			} else {
				break;
			}
		}
		System.out.println(cnt + 1);
	} main {
		Scanner 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();
		}
		sc.close();

		int cnt = 0; // 1回目は必ず含む
		int x = 0;
		while (true) {
			if (cnt >= N) {
				break;
			}

			if (x + L[cnt] <= X) {
				x = x + L[cnt];
				cnt++;
			} else {
				break;
			}
		}
		System.out.println(cnt + 1);
	} 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[] 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 sc.close() sc.close sc int cnt = 0; cnt 0 int x = 0; x 0 while (true) {
			if (cnt >= N) {
				break;
			}

			if (x + L[cnt] <= X) {
				x = x + L[cnt];
				cnt++;
			} else {
				break;
			}
		} true {
			if (cnt >= N) {
				break;
			}

			if (x + L[cnt] <= X) {
				x = x + L[cnt];
				cnt++;
			} else {
				break;
			}
		} if (cnt >= N) {
				break;
			} cnt >= N cnt N {
				break;
			} break; if (x + L[cnt] <= X) {
				x = x + L[cnt];
				cnt++;
			} else {
				break;
			} x + L[cnt] <= X x + L[cnt] x L[cnt] L cnt X {
				x = x + L[cnt];
				cnt++;
			} x = x + L[cnt] x x + L[cnt] x L[cnt] L cnt cnt++ cnt {
				break;
			} break; System.out.println(cnt + 1) System.out.println System.out System System.out cnt + 1 cnt 1 String[] args args public class Main {
	public static void main(String[] args) {
		Scanner 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();
		}
		sc.close();

		int cnt = 0; // 1回目は必ず含む
		int x = 0;
		while (true) {
			if (cnt >= N) {
				break;
			}

			if (x + L[cnt] <= X) {
				x = x + L[cnt];
				cnt++;
			} else {
				break;
			}
		}
		System.out.println(cnt + 1);
	}
} public class Main {
	public static void main(String[] args) {
		Scanner 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();
		}
		sc.close();

		int cnt = 0; // 1回目は必ず含む
		int x = 0;
		while (true) {
			if (cnt >= N) {
				break;
			}

			if (x + L[cnt] <= X) {
				x = x + L[cnt];
				cnt++;
			} else {
				break;
			}
		}
		System.out.println(cnt + 1);
	}
} Main
import java.util.*;

public class Main {
	public static void main(String[] args) {
		Scanner 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();
		}
		sc.close();

		int cnt = 0; // 1回目は必ず含む
		int x = 0;
		while (true) {
			if (cnt >= N) {
				break;
			}

			if (x + L[cnt] <= X) {
				x = x + L[cnt];
				cnt++;
			} else {
				break;
			}
		}
		System.out.println(cnt + 1);
	}
}
