import java.util.Scanner;

public class Main { 
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String[] line = sc.nextLine().split(" ");
		int startStep = Integer.parseInt(line[0]);
		int boundMax = Integer.parseInt(line[1]);
		String[] boundStep = sc.nextLine().split(" ");
		
		int resultCount = 1;
		int boundTotal = 0;
		for(int i = 0;i<boundStep.length;i++) {
			int tmp = Integer.parseInt(boundStep[i]);
			boundTotal += tmp;
			if(boundMax<boundTotal) {
				break;
			}
			resultCount++;
		}
		System.out.println(resultCount);
		
	}
}
	
	 import java.util.Scanner; Scanner java.util public class Main { 
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String[] line = sc.nextLine().split(" ");
		int startStep = Integer.parseInt(line[0]);
		int boundMax = Integer.parseInt(line[1]);
		String[] boundStep = sc.nextLine().split(" ");
		
		int resultCount = 1;
		int boundTotal = 0;
		for(int i = 0;i<boundStep.length;i++) {
			int tmp = Integer.parseInt(boundStep[i]);
			boundTotal += tmp;
			if(boundMax<boundTotal) {
				break;
			}
			resultCount++;
		}
		System.out.println(resultCount);
		
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String[] line = sc.nextLine().split(" ");
		int startStep = Integer.parseInt(line[0]);
		int boundMax = Integer.parseInt(line[1]);
		String[] boundStep = sc.nextLine().split(" ");
		
		int resultCount = 1;
		int boundTotal = 0;
		for(int i = 0;i<boundStep.length;i++) {
			int tmp = Integer.parseInt(boundStep[i]);
			boundTotal += tmp;
			if(boundMax<boundTotal) {
				break;
			}
			resultCount++;
		}
		System.out.println(resultCount);
		
	} main {
		Scanner sc = new Scanner(System.in);
		String[] line = sc.nextLine().split(" ");
		int startStep = Integer.parseInt(line[0]);
		int boundMax = Integer.parseInt(line[1]);
		String[] boundStep = sc.nextLine().split(" ");
		
		int resultCount = 1;
		int boundTotal = 0;
		for(int i = 0;i<boundStep.length;i++) {
			int tmp = Integer.parseInt(boundStep[i]);
			boundTotal += tmp;
			if(boundMax<boundTotal) {
				break;
			}
			resultCount++;
		}
		System.out.println(resultCount);
		
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String[] line = sc.nextLine().split(" "); line sc.nextLine().split(" ") sc.nextLine().split sc.nextLine() sc.nextLine sc " " int startStep = Integer.parseInt(line[0]); startStep Integer.parseInt(line[0]) Integer.parseInt Integer line[0] line 0 int boundMax = Integer.parseInt(line[1]); boundMax Integer.parseInt(line[1]) Integer.parseInt Integer line[1] line 1 String[] boundStep = sc.nextLine().split(" "); boundStep sc.nextLine().split(" ") sc.nextLine().split sc.nextLine() sc.nextLine sc " " int resultCount = 1; resultCount 1 int boundTotal = 0; boundTotal 0 for(int i = 0;i<boundStep.length;i++) {
			int tmp = Integer.parseInt(boundStep[i]);
			boundTotal += tmp;
			if(boundMax<boundTotal) {
				break;
			}
			resultCount++;
		} int i = 0; int i = 0; i 0 i<boundStep.length i boundStep.length boundStep boundStep.length i++ i++ i {
			int tmp = Integer.parseInt(boundStep[i]);
			boundTotal += tmp;
			if(boundMax<boundTotal) {
				break;
			}
			resultCount++;
		} {
			int tmp = Integer.parseInt(boundStep[i]);
			boundTotal += tmp;
			if(boundMax<boundTotal) {
				break;
			}
			resultCount++;
		} int tmp = Integer.parseInt(boundStep[i]); tmp Integer.parseInt(boundStep[i]) Integer.parseInt Integer boundStep[i] boundStep i boundTotal += tmp boundTotal tmp if(boundMax<boundTotal) {
				break;
			} boundMax<boundTotal boundMax boundTotal {
				break;
			} break; resultCount++ resultCount System.out.println(resultCount) System.out.println System.out System System.out resultCount String[] args args public class Main { 
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String[] line = sc.nextLine().split(" ");
		int startStep = Integer.parseInt(line[0]);
		int boundMax = Integer.parseInt(line[1]);
		String[] boundStep = sc.nextLine().split(" ");
		
		int resultCount = 1;
		int boundTotal = 0;
		for(int i = 0;i<boundStep.length;i++) {
			int tmp = Integer.parseInt(boundStep[i]);
			boundTotal += tmp;
			if(boundMax<boundTotal) {
				break;
			}
			resultCount++;
		}
		System.out.println(resultCount);
		
	}
} public class Main { 
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String[] line = sc.nextLine().split(" ");
		int startStep = Integer.parseInt(line[0]);
		int boundMax = Integer.parseInt(line[1]);
		String[] boundStep = sc.nextLine().split(" ");
		
		int resultCount = 1;
		int boundTotal = 0;
		for(int i = 0;i<boundStep.length;i++) {
			int tmp = Integer.parseInt(boundStep[i]);
			boundTotal += tmp;
			if(boundMax<boundTotal) {
				break;
			}
			resultCount++;
		}
		System.out.println(resultCount);
		
	}
} Main
import java.util.Scanner;

public class Main { 
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String[] line = sc.nextLine().split(" ");
		int startStep = Integer.parseInt(line[0]);
		int boundMax = Integer.parseInt(line[1]);
		String[] boundStep = sc.nextLine().split(" ");
		
		int resultCount = 1;
		int boundTotal = 0;
		for(int i = 0;i<boundStep.length;i++) {
			int tmp = Integer.parseInt(boundStep[i]);
			boundTotal += tmp;
			if(boundMax<boundTotal) {
				break;
			}
			resultCount++;
		}
		System.out.println(resultCount);
		
	}
}
	
	