import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int X = sc.nextInt();
		int []L = new int[N];

		int zahyou = 0;
		int cnt = 1;

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

		for (int i=0; i<N; i++) {
			int tmp = L[i];
			zahyou+=tmp;
			if (zahyou<=X) {
				cnt+=1;
			} else {
				break;
			}

		}

		System.out.println(cnt);

	}

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

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int X = sc.nextInt();
		int []L = new int[N];

		int zahyou = 0;
		int cnt = 1;

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

		for (int i=0; i<N; i++) {
			int tmp = L[i];
			zahyou+=tmp;
			if (zahyou<=X) {
				cnt+=1;
			} else {
				break;
			}

		}

		System.out.println(cnt);

	}

} Main public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int X = sc.nextInt();
		int []L = new int[N];

		int zahyou = 0;
		int cnt = 1;

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

		for (int i=0; i<N; i++) {
			int tmp = L[i];
			zahyou+=tmp;
			if (zahyou<=X) {
				cnt+=1;
			} else {
				break;
			}

		}

		System.out.println(cnt);

	} main {
		// TODO 自動生成されたメソッド・スタブ
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int X = sc.nextInt();
		int []L = new int[N];

		int zahyou = 0;
		int cnt = 1;

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

		for (int i=0; i<N; i++) {
			int tmp = L[i];
			zahyou+=tmp;
			if (zahyou<=X) {
				cnt+=1;
			} else {
				break;
			}

		}

		System.out.println(cnt);

	} 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 int zahyou = 0; zahyou 0 int cnt = 1; cnt 1 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 for (int i=0; i<N; i++) {
			int tmp = L[i];
			zahyou+=tmp;
			if (zahyou<=X) {
				cnt+=1;
			} else {
				break;
			}

		} int i=0; int i=0; i 0 i<N i N i++ i++ i {
			int tmp = L[i];
			zahyou+=tmp;
			if (zahyou<=X) {
				cnt+=1;
			} else {
				break;
			}

		} {
			int tmp = L[i];
			zahyou+=tmp;
			if (zahyou<=X) {
				cnt+=1;
			} else {
				break;
			}

		} int tmp = L[i]; tmp L[i] L i zahyou+=tmp zahyou tmp if (zahyou<=X) {
				cnt+=1;
			} else {
				break;
			} zahyou<=X zahyou X {
				cnt+=1;
			} cnt+=1 cnt 1 {
				break;
			} break; System.out.println(cnt) System.out.println System.out System System.out cnt String[] args args public class Main {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int X = sc.nextInt();
		int []L = new int[N];

		int zahyou = 0;
		int cnt = 1;

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

		for (int i=0; i<N; i++) {
			int tmp = L[i];
			zahyou+=tmp;
			if (zahyou<=X) {
				cnt+=1;
			} else {
				break;
			}

		}

		System.out.println(cnt);

	}

} public class Main {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int X = sc.nextInt();
		int []L = new int[N];

		int zahyou = 0;
		int cnt = 1;

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

		for (int i=0; i<N; i++) {
			int tmp = L[i];
			zahyou+=tmp;
			if (zahyou<=X) {
				cnt+=1;
			} else {
				break;
			}

		}

		System.out.println(cnt);

	}

} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int X = sc.nextInt();
		int []L = new int[N];

		int zahyou = 0;
		int cnt = 1;

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

		for (int i=0; i<N; i++) {
			int tmp = L[i];
			zahyou+=tmp;
			if (zahyou<=X) {
				cnt+=1;
			} else {
				break;
			}

		}

		System.out.println(cnt);

	}

}
