import java.util.Scanner;
import java.util.ArrayList;
import java.util.List;

public class Main{
	public static void main(String[] args){
      
      	String[] input1;
      	String[] input2;
        
      	try (Scanner sc = new Scanner(System.in)) {
          input1 = sc.nextLine().split(" "); // nextLine:enterまで取得
          input2 = sc.nextLine().split(" ");
        }
      	
      	int n = Integer.parseInt(input1[0]);
        int x = Integer.parseInt(input1[1]);
      
      	List<Integer> list = new ArrayList<>();
      	for (String str : input2) {
         	list.add(Integer.parseInt(str));
        }
		
      	int d = 0;
      	int cnt = 1;
        for (int i = 0; i < list.size(); i++){
        	int e = d + list.get(i);
          
          	if (e <= x) {
              cnt ++;
            }  
          	d = e;
        }
      System.out.println(cnt);
	}
} import java.util.Scanner; Scanner java.util import java.util.ArrayList; ArrayList java.util import java.util.List; List java.util public class Main{
	public static void main(String[] args){
      
      	String[] input1;
      	String[] input2;
        
      	try (Scanner sc = new Scanner(System.in)) {
          input1 = sc.nextLine().split(" "); // nextLine:enterまで取得
          input2 = sc.nextLine().split(" ");
        }
      	
      	int n = Integer.parseInt(input1[0]);
        int x = Integer.parseInt(input1[1]);
      
      	List<Integer> list = new ArrayList<>();
      	for (String str : input2) {
         	list.add(Integer.parseInt(str));
        }
		
      	int d = 0;
      	int cnt = 1;
        for (int i = 0; i < list.size(); i++){
        	int e = d + list.get(i);
          
          	if (e <= x) {
              cnt ++;
            }  
          	d = e;
        }
      System.out.println(cnt);
	}
} Main public static void main(String[] args){
      
      	String[] input1;
      	String[] input2;
        
      	try (Scanner sc = new Scanner(System.in)) {
          input1 = sc.nextLine().split(" "); // nextLine:enterまで取得
          input2 = sc.nextLine().split(" ");
        }
      	
      	int n = Integer.parseInt(input1[0]);
        int x = Integer.parseInt(input1[1]);
      
      	List<Integer> list = new ArrayList<>();
      	for (String str : input2) {
         	list.add(Integer.parseInt(str));
        }
		
      	int d = 0;
      	int cnt = 1;
        for (int i = 0; i < list.size(); i++){
        	int e = d + list.get(i);
          
          	if (e <= x) {
              cnt ++;
            }  
          	d = e;
        }
      System.out.println(cnt);
	} main {
      
      	String[] input1;
      	String[] input2;
        
      	try (Scanner sc = new Scanner(System.in)) {
          input1 = sc.nextLine().split(" "); // nextLine:enterまで取得
          input2 = sc.nextLine().split(" ");
        }
      	
      	int n = Integer.parseInt(input1[0]);
        int x = Integer.parseInt(input1[1]);
      
      	List<Integer> list = new ArrayList<>();
      	for (String str : input2) {
         	list.add(Integer.parseInt(str));
        }
		
      	int d = 0;
      	int cnt = 1;
        for (int i = 0; i < list.size(); i++){
        	int e = d + list.get(i);
          
          	if (e <= x) {
              cnt ++;
            }  
          	d = e;
        }
      System.out.println(cnt);
	} String[] input1; input1 String[] input2; input2 try (Scanner sc = new Scanner(System.in)) {
          input1 = sc.nextLine().split(" "); // nextLine:enterまで取得
          input2 = sc.nextLine().split(" ");
        } {
          input1 = sc.nextLine().split(" "); // nextLine:enterまで取得
          input2 = sc.nextLine().split(" ");
        } Scanner sc = new Scanner(System.in) Scanner sc = new Scanner(System.in) new Scanner(System.in) input1 = sc.nextLine().split(" ") input1 sc.nextLine().split(" ") sc.nextLine().split sc.nextLine() sc.nextLine sc " " input2 = sc.nextLine().split(" ") input2 sc.nextLine().split(" ") sc.nextLine().split sc.nextLine() sc.nextLine sc " " int n = Integer.parseInt(input1[0]); n Integer.parseInt(input1[0]) Integer.parseInt Integer input1[0] input1 0 int x = Integer.parseInt(input1[1]); x Integer.parseInt(input1[1]) Integer.parseInt Integer input1[1] input1 1 List<Integer> list = new ArrayList<>(); list new ArrayList<>() for (String str : input2) {
         	list.add(Integer.parseInt(str));
        } String str input2 {
         	list.add(Integer.parseInt(str));
        } {
         	list.add(Integer.parseInt(str));
        } list.add(Integer.parseInt(str)) list.add list Integer.parseInt(str) Integer.parseInt Integer str int d = 0; d 0 int cnt = 1; cnt 1 for (int i = 0; i < list.size(); i++){
        	int e = d + list.get(i);
          
          	if (e <= x) {
              cnt ++;
            }  
          	d = e;
        } int i = 0; int i = 0; i 0 i < list.size() i list.size() list.size list i++ i++ i {
        	int e = d + list.get(i);
          
          	if (e <= x) {
              cnt ++;
            }  
          	d = e;
        } {
        	int e = d + list.get(i);
          
          	if (e <= x) {
              cnt ++;
            }  
          	d = e;
        } int e = d + list.get(i); e d + list.get(i) d list.get(i) list.get list i if (e <= x) {
              cnt ++;
            } e <= x e x {
              cnt ++;
            } cnt ++ cnt d = e d e 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){
      
      	String[] input1;
      	String[] input2;
        
      	try (Scanner sc = new Scanner(System.in)) {
          input1 = sc.nextLine().split(" "); // nextLine:enterまで取得
          input2 = sc.nextLine().split(" ");
        }
      	
      	int n = Integer.parseInt(input1[0]);
        int x = Integer.parseInt(input1[1]);
      
      	List<Integer> list = new ArrayList<>();
      	for (String str : input2) {
         	list.add(Integer.parseInt(str));
        }
		
      	int d = 0;
      	int cnt = 1;
        for (int i = 0; i < list.size(); i++){
        	int e = d + list.get(i);
          
          	if (e <= x) {
              cnt ++;
            }  
          	d = e;
        }
      System.out.println(cnt);
	}
} public class Main{
	public static void main(String[] args){
      
      	String[] input1;
      	String[] input2;
        
      	try (Scanner sc = new Scanner(System.in)) {
          input1 = sc.nextLine().split(" "); // nextLine:enterまで取得
          input2 = sc.nextLine().split(" ");
        }
      	
      	int n = Integer.parseInt(input1[0]);
        int x = Integer.parseInt(input1[1]);
      
      	List<Integer> list = new ArrayList<>();
      	for (String str : input2) {
         	list.add(Integer.parseInt(str));
        }
		
      	int d = 0;
      	int cnt = 1;
        for (int i = 0; i < list.size(); i++){
        	int e = d + list.get(i);
          
          	if (e <= x) {
              cnt ++;
            }  
          	d = e;
        }
      System.out.println(cnt);
	}
} Main
import java.util.Scanner;
import java.util.ArrayList;
import java.util.List;

public class Main{
	public static void main(String[] args){
      
      	String[] input1;
      	String[] input2;
        
      	try (Scanner sc = new Scanner(System.in)) {
          input1 = sc.nextLine().split(" "); // nextLine:enterまで取得
          input2 = sc.nextLine().split(" ");
        }
      	
      	int n = Integer.parseInt(input1[0]);
        int x = Integer.parseInt(input1[1]);
      
      	List<Integer> list = new ArrayList<>();
      	for (String str : input2) {
         	list.add(Integer.parseInt(str));
        }
		
      	int d = 0;
      	int cnt = 1;
        for (int i = 0; i < list.size(); i++){
        	int e = d + list.get(i);
          
          	if (e <= x) {
              cnt ++;
            }  
          	d = e;
        }
      System.out.println(cnt);
	}
}
