import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String[] spl1 = sc.nextLine().split(" ");
		int N = Integer.parseInt(spl1[0]);
		int X = Integer.parseInt(spl1[1]);
		String[] spl2 = sc.nextLine().split(" ");
		int[] L = new int[N];
		for(int i = 0;i < N;i++) {
			L[i] = Integer.parseInt(spl2[i]);
		}

		int D = 0;//D0 初期値
		int cnt = 1;//カウンタ
		for(int i = 0;i < N;i++) {
			D += L[i];
			if(D > X) break;
			cnt++;
		}
		System.out.println(cnt);
	}
} import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String[] spl1 = sc.nextLine().split(" ");
		int N = Integer.parseInt(spl1[0]);
		int X = Integer.parseInt(spl1[1]);
		String[] spl2 = sc.nextLine().split(" ");
		int[] L = new int[N];
		for(int i = 0;i < N;i++) {
			L[i] = Integer.parseInt(spl2[i]);
		}

		int D = 0;//D0 初期値
		int cnt = 1;//カウンタ
		for(int i = 0;i < N;i++) {
			D += L[i];
			if(D > X) break;
			cnt++;
		}
		System.out.println(cnt);
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String[] spl1 = sc.nextLine().split(" ");
		int N = Integer.parseInt(spl1[0]);
		int X = Integer.parseInt(spl1[1]);
		String[] spl2 = sc.nextLine().split(" ");
		int[] L = new int[N];
		for(int i = 0;i < N;i++) {
			L[i] = Integer.parseInt(spl2[i]);
		}

		int D = 0;//D0 初期値
		int cnt = 1;//カウンタ
		for(int i = 0;i < N;i++) {
			D += L[i];
			if(D > X) break;
			cnt++;
		}
		System.out.println(cnt);
	} main {
		Scanner sc = new Scanner(System.in);
		String[] spl1 = sc.nextLine().split(" ");
		int N = Integer.parseInt(spl1[0]);
		int X = Integer.parseInt(spl1[1]);
		String[] spl2 = sc.nextLine().split(" ");
		int[] L = new int[N];
		for(int i = 0;i < N;i++) {
			L[i] = Integer.parseInt(spl2[i]);
		}

		int D = 0;//D0 初期値
		int cnt = 1;//カウンタ
		for(int i = 0;i < N;i++) {
			D += L[i];
			if(D > X) break;
			cnt++;
		}
		System.out.println(cnt);
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String[] spl1 = sc.nextLine().split(" "); spl1 sc.nextLine().split(" ") sc.nextLine().split sc.nextLine() sc.nextLine sc " " int N = Integer.parseInt(spl1[0]); N Integer.parseInt(spl1[0]) Integer.parseInt Integer spl1[0] spl1 0 int X = Integer.parseInt(spl1[1]); X Integer.parseInt(spl1[1]) Integer.parseInt Integer spl1[1] spl1 1 String[] spl2 = sc.nextLine().split(" "); spl2 sc.nextLine().split(" ") sc.nextLine().split sc.nextLine() sc.nextLine sc " " int[] L = new int[N]; L new int[N] N for(int i = 0;i < N;i++) {
			L[i] = Integer.parseInt(spl2[i]);
		} int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
			L[i] = Integer.parseInt(spl2[i]);
		} {
			L[i] = Integer.parseInt(spl2[i]);
		} L[i] = Integer.parseInt(spl2[i]) L[i] L i Integer.parseInt(spl2[i]) Integer.parseInt Integer spl2[i] spl2 i int D = 0; D 0 int cnt = 1; cnt 1 for(int i = 0;i < N;i++) {
			D += L[i];
			if(D > X) break;
			cnt++;
		} int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
			D += L[i];
			if(D > X) break;
			cnt++;
		} {
			D += L[i];
			if(D > X) break;
			cnt++;
		} D += L[i] D L[i] L i if(D > X) break; D > X D X break; cnt++ cnt 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) {
		Scanner sc = new Scanner(System.in);
		String[] spl1 = sc.nextLine().split(" ");
		int N = Integer.parseInt(spl1[0]);
		int X = Integer.parseInt(spl1[1]);
		String[] spl2 = sc.nextLine().split(" ");
		int[] L = new int[N];
		for(int i = 0;i < N;i++) {
			L[i] = Integer.parseInt(spl2[i]);
		}

		int D = 0;//D0 初期値
		int cnt = 1;//カウンタ
		for(int i = 0;i < N;i++) {
			D += L[i];
			if(D > X) break;
			cnt++;
		}
		System.out.println(cnt);
	}
} public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String[] spl1 = sc.nextLine().split(" ");
		int N = Integer.parseInt(spl1[0]);
		int X = Integer.parseInt(spl1[1]);
		String[] spl2 = sc.nextLine().split(" ");
		int[] L = new int[N];
		for(int i = 0;i < N;i++) {
			L[i] = Integer.parseInt(spl2[i]);
		}

		int D = 0;//D0 初期値
		int cnt = 1;//カウンタ
		for(int i = 0;i < N;i++) {
			D += L[i];
			if(D > X) break;
			cnt++;
		}
		System.out.println(cnt);
	}
} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String[] spl1 = sc.nextLine().split(" ");
		int N = Integer.parseInt(spl1[0]);
		int X = Integer.parseInt(spl1[1]);
		String[] spl2 = sc.nextLine().split(" ");
		int[] L = new int[N];
		for(int i = 0;i < N;i++) {
			L[i] = Integer.parseInt(spl2[i]);
		}

		int D = 0;//D0 初期値
		int cnt = 1;//カウンタ
		for(int i = 0;i < N;i++) {
			D += L[i];
			if(D > X) break;
			cnt++;
		}
		System.out.println(cnt);
	}
}