
import java.util.Scanner;

public class Main {
	public static void main(String [] args) {
		Scanner scanner = new Scanner(System.in);
		//读取数据
		int N = scanner.nextInt();
		int X = scanner.nextInt();
		int [] L = new int[N];
		int ans = N + 1;
		int i = 0;
		do {
			L[i] = scanner.nextInt();
			i ++;
		}while(i < N);
		int [] arr = new int[N + 1];
		arr[0] = 0;
		for(int j = 1; j <= N; j++) {
			arr[j] = arr[j-1] + L[j-1];
			if(arr[j] > X) {
				ans = j;
				break;
			}
		}
		System.out.println(ans);
		
	}
} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String [] args) {
		Scanner scanner = new Scanner(System.in);
		//读取数据
		int N = scanner.nextInt();
		int X = scanner.nextInt();
		int [] L = new int[N];
		int ans = N + 1;
		int i = 0;
		do {
			L[i] = scanner.nextInt();
			i ++;
		}while(i < N);
		int [] arr = new int[N + 1];
		arr[0] = 0;
		for(int j = 1; j <= N; j++) {
			arr[j] = arr[j-1] + L[j-1];
			if(arr[j] > X) {
				ans = j;
				break;
			}
		}
		System.out.println(ans);
		
	}
} Main public static void main(String [] args) {
		Scanner scanner = new Scanner(System.in);
		//读取数据
		int N = scanner.nextInt();
		int X = scanner.nextInt();
		int [] L = new int[N];
		int ans = N + 1;
		int i = 0;
		do {
			L[i] = scanner.nextInt();
			i ++;
		}while(i < N);
		int [] arr = new int[N + 1];
		arr[0] = 0;
		for(int j = 1; j <= N; j++) {
			arr[j] = arr[j-1] + L[j-1];
			if(arr[j] > X) {
				ans = j;
				break;
			}
		}
		System.out.println(ans);
		
	} main {
		Scanner scanner = new Scanner(System.in);
		//读取数据
		int N = scanner.nextInt();
		int X = scanner.nextInt();
		int [] L = new int[N];
		int ans = N + 1;
		int i = 0;
		do {
			L[i] = scanner.nextInt();
			i ++;
		}while(i < N);
		int [] arr = new int[N + 1];
		arr[0] = 0;
		for(int j = 1; j <= N; j++) {
			arr[j] = arr[j-1] + L[j-1];
			if(arr[j] > X) {
				ans = j;
				break;
			}
		}
		System.out.println(ans);
		
	} Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) int N = scanner.nextInt(); N scanner.nextInt() scanner.nextInt scanner int X = scanner.nextInt(); X scanner.nextInt() scanner.nextInt scanner int [] L = new int[N]; L new int[N] N int ans = N + 1; ans N + 1 N 1 int i = 0; i 0 do {
			L[i] = scanner.nextInt();
			i ++;
		}while(i < N); i < N i N {
			L[i] = scanner.nextInt();
			i ++;
		} L[i] = scanner.nextInt() L[i] L i scanner.nextInt() scanner.nextInt scanner i ++ i int [] arr = new int[N + 1]; arr new int[N + 1] N + 1 N 1 arr[0] = 0 arr[0] arr 0 0 for(int j = 1; j <= N; j++) {
			arr[j] = arr[j-1] + L[j-1];
			if(arr[j] > X) {
				ans = j;
				break;
			}
		} int j = 1; int j = 1; j 1 j <= N j N j++ j++ j {
			arr[j] = arr[j-1] + L[j-1];
			if(arr[j] > X) {
				ans = j;
				break;
			}
		} {
			arr[j] = arr[j-1] + L[j-1];
			if(arr[j] > X) {
				ans = j;
				break;
			}
		} arr[j] = arr[j-1] + L[j-1] arr[j] arr j arr[j-1] + L[j-1] arr[j-1] arr j-1 j 1 L[j-1] L j-1 j 1 if(arr[j] > X) {
				ans = j;
				break;
			} arr[j] > X arr[j] arr j X {
				ans = j;
				break;
			} ans = j ans j break; System.out.println(ans) System.out.println System.out System System.out ans String [] args args public class Main {
	public static void main(String [] args) {
		Scanner scanner = new Scanner(System.in);
		//读取数据
		int N = scanner.nextInt();
		int X = scanner.nextInt();
		int [] L = new int[N];
		int ans = N + 1;
		int i = 0;
		do {
			L[i] = scanner.nextInt();
			i ++;
		}while(i < N);
		int [] arr = new int[N + 1];
		arr[0] = 0;
		for(int j = 1; j <= N; j++) {
			arr[j] = arr[j-1] + L[j-1];
			if(arr[j] > X) {
				ans = j;
				break;
			}
		}
		System.out.println(ans);
		
	}
} public class Main {
	public static void main(String [] args) {
		Scanner scanner = new Scanner(System.in);
		//读取数据
		int N = scanner.nextInt();
		int X = scanner.nextInt();
		int [] L = new int[N];
		int ans = N + 1;
		int i = 0;
		do {
			L[i] = scanner.nextInt();
			i ++;
		}while(i < N);
		int [] arr = new int[N + 1];
		arr[0] = 0;
		for(int j = 1; j <= N; j++) {
			arr[j] = arr[j-1] + L[j-1];
			if(arr[j] > X) {
				ans = j;
				break;
			}
		}
		System.out.println(ans);
		
	}
} Main

import java.util.Scanner;

public class Main {
	public static void main(String [] args) {
		Scanner scanner = new Scanner(System.in);
		//读取数据
		int N = scanner.nextInt();
		int X = scanner.nextInt();
		int [] L = new int[N];
		int ans = N + 1;
		int i = 0;
		do {
			L[i] = scanner.nextInt();
			i ++;
		}while(i < N);
		int [] arr = new int[N + 1];
		arr[0] = 0;
		for(int j = 1; j <= N; j++) {
			arr[j] = arr[j-1] + L[j-1];
			if(arr[j] > X) {
				ans = j;
				break;
			}
		}
		System.out.println(ans);
		
	}
}
