import java.util.Scanner;

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

		int N = sc.nextInt();
		int X = sc.nextInt();
		int[] D = new int[N+1];
		D[0] = 0;

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

		// X内でバウンドした回数
		int counter = 0;

		for(int coordinate : D) {
			if(X < coordinate) break;
			counter++;
		}

		System.out.println(counter);

		sc.close();
	}
} import java.util.Scanner; Scanner 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[] D = new int[N+1];
		D[0] = 0;

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

		// X内でバウンドした回数
		int counter = 0;

		for(int coordinate : D) {
			if(X < coordinate) break;
			counter++;
		}

		System.out.println(counter);

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

		int N = sc.nextInt();
		int X = sc.nextInt();
		int[] D = new int[N+1];
		D[0] = 0;

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

		// X内でバウンドした回数
		int counter = 0;

		for(int coordinate : D) {
			if(X < coordinate) break;
			counter++;
		}

		System.out.println(counter);

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

		int N = sc.nextInt();
		int X = sc.nextInt();
		int[] D = new int[N+1];
		D[0] = 0;

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

		// X内でバウンドした回数
		int counter = 0;

		for(int coordinate : D) {
			if(X < coordinate) break;
			counter++;
		}

		System.out.println(counter);

		sc.close();
	} 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[] D = new int[N+1]; D new int[N+1] N+1 N 1 D[0] = 0 D[0] D 0 0 for (int i = 0; i < N; ++i) {
			D[i+1] = D[i] + sc.nextInt();
		} int i = 0; int i = 0; i 0 i < N i N ++i ++i i {
			D[i+1] = D[i] + sc.nextInt();
		} {
			D[i+1] = D[i] + sc.nextInt();
		} D[i+1] = D[i] + sc.nextInt() D[i+1] D i+1 i 1 D[i] + sc.nextInt() D[i] D i sc.nextInt() sc.nextInt sc int counter = 0; counter 0 for(int coordinate : D) {
			if(X < coordinate) break;
			counter++;
		} int coordinate D {
			if(X < coordinate) break;
			counter++;
		} {
			if(X < coordinate) break;
			counter++;
		} if(X < coordinate) break; X < coordinate X coordinate break; counter++ counter System.out.println(counter) System.out.println System.out System System.out counter sc.close() sc.close sc 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[] D = new int[N+1];
		D[0] = 0;

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

		// X内でバウンドした回数
		int counter = 0;

		for(int coordinate : D) {
			if(X < coordinate) break;
			counter++;
		}

		System.out.println(counter);

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

		int N = sc.nextInt();
		int X = sc.nextInt();
		int[] D = new int[N+1];
		D[0] = 0;

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

		// X内でバウンドした回数
		int counter = 0;

		for(int coordinate : D) {
			if(X < coordinate) break;
			counter++;
		}

		System.out.println(counter);

		sc.close();
	}
} Main
import java.util.Scanner;

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

		int N = sc.nextInt();
		int X = sc.nextInt();
		int[] D = new int[N+1];
		D[0] = 0;

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

		// X内でバウンドした回数
		int counter = 0;

		for(int coordinate : D) {
			if(X < coordinate) break;
			counter++;
		}

		System.out.println(counter);

		sc.close();
	}
}