import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b = sc.nextInt();
		int[] array = new int[a];
		int count = 1;
		int z = 0;
		for(int i = 0; i < array.length; i++) {
			array[i] = sc.nextInt();
		}
		for(int i = 0; i < array.length; i++) {
			z += array[i];
			if(z <= b) {
				count++;
			}	
		}
		System.out.println(count);
	}
} import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {
		
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b = sc.nextInt();
		int[] array = new int[a];
		int count = 1;
		int z = 0;
		for(int i = 0; i < array.length; i++) {
			array[i] = sc.nextInt();
		}
		for(int i = 0; i < array.length; i++) {
			z += array[i];
			if(z <= b) {
				count++;
			}	
		}
		System.out.println(count);
	}
} Main public static void main(String[] args) {
		
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b = sc.nextInt();
		int[] array = new int[a];
		int count = 1;
		int z = 0;
		for(int i = 0; i < array.length; i++) {
			array[i] = sc.nextInt();
		}
		for(int i = 0; i < array.length; i++) {
			z += array[i];
			if(z <= b) {
				count++;
			}	
		}
		System.out.println(count);
	} main {
		
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b = sc.nextInt();
		int[] array = new int[a];
		int count = 1;
		int z = 0;
		for(int i = 0; i < array.length; i++) {
			array[i] = sc.nextInt();
		}
		for(int i = 0; i < array.length; i++) {
			z += array[i];
			if(z <= b) {
				count++;
			}	
		}
		System.out.println(count);
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int a = sc.nextInt(); a sc.nextInt() sc.nextInt sc int b = sc.nextInt(); b sc.nextInt() sc.nextInt sc int[] array = new int[a]; array new int[a] a int count = 1; count 1 int z = 0; z 0 for(int i = 0; i < array.length; i++) {
			array[i] = sc.nextInt();
		} int i = 0; int i = 0; i 0 i < array.length i array.length array array.length i++ i++ i {
			array[i] = sc.nextInt();
		} {
			array[i] = sc.nextInt();
		} array[i] = sc.nextInt() array[i] array i sc.nextInt() sc.nextInt sc for(int i = 0; i < array.length; i++) {
			z += array[i];
			if(z <= b) {
				count++;
			}	
		} int i = 0; int i = 0; i 0 i < array.length i array.length array array.length i++ i++ i {
			z += array[i];
			if(z <= b) {
				count++;
			}	
		} {
			z += array[i];
			if(z <= b) {
				count++;
			}	
		} z += array[i] z array[i] array i if(z <= b) {
				count++;
			} z <= b z b {
				count++;
			} count++ count System.out.println(count) System.out.println System.out System System.out count String[] args args public class Main {

	public static void main(String[] args) {
		
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b = sc.nextInt();
		int[] array = new int[a];
		int count = 1;
		int z = 0;
		for(int i = 0; i < array.length; i++) {
			array[i] = sc.nextInt();
		}
		for(int i = 0; i < array.length; i++) {
			z += array[i];
			if(z <= b) {
				count++;
			}	
		}
		System.out.println(count);
	}
} public class Main {

	public static void main(String[] args) {
		
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b = sc.nextInt();
		int[] array = new int[a];
		int count = 1;
		int z = 0;
		for(int i = 0; i < array.length; i++) {
			array[i] = sc.nextInt();
		}
		for(int i = 0; i < array.length; i++) {
			z += array[i];
			if(z <= b) {
				count++;
			}	
		}
		System.out.println(count);
	}
} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b = sc.nextInt();
		int[] array = new int[a];
		int count = 1;
		int z = 0;
		for(int i = 0; i < array.length; i++) {
			array[i] = sc.nextInt();
		}
		for(int i = 0; i < array.length; i++) {
			z += array[i];
			if(z <= b) {
				count++;
			}	
		}
		System.out.println(count);
	}
}