import java.util.*; 
 
class Main{
public static void main(String[] args){
	Scanner sc=new Scanner(System.in);
        int n=sc.nextInt();
        int x=sc.nextInt();
 
  		int[] l=new int[n];
  		int d=0;
  		int ans=0;
		for(int c=0;c<n;c++){
    		l[c]=sc.nextInt();
          	d+=l[c];
            if(d<=x){
            	ans++;
            }else{
            	break;
            }
    	}
    
    	System.out.println(ans+1);
    }
} import java.util.*; util.* java class Main{
public static void main(String[] args){
	Scanner sc=new Scanner(System.in);
        int n=sc.nextInt();
        int x=sc.nextInt();
 
  		int[] l=new int[n];
  		int d=0;
  		int ans=0;
		for(int c=0;c<n;c++){
    		l[c]=sc.nextInt();
          	d+=l[c];
            if(d<=x){
            	ans++;
            }else{
            	break;
            }
    	}
    
    	System.out.println(ans+1);
    }
} Main public static void main(String[] args){
	Scanner sc=new Scanner(System.in);
        int n=sc.nextInt();
        int x=sc.nextInt();
 
  		int[] l=new int[n];
  		int d=0;
  		int ans=0;
		for(int c=0;c<n;c++){
    		l[c]=sc.nextInt();
          	d+=l[c];
            if(d<=x){
            	ans++;
            }else{
            	break;
            }
    	}
    
    	System.out.println(ans+1);
    } main {
	Scanner sc=new Scanner(System.in);
        int n=sc.nextInt();
        int x=sc.nextInt();
 
  		int[] l=new int[n];
  		int d=0;
  		int ans=0;
		for(int c=0;c<n;c++){
    		l[c]=sc.nextInt();
          	d+=l[c];
            if(d<=x){
            	ans++;
            }else{
            	break;
            }
    	}
    
    	System.out.println(ans+1);
    } 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[] l=new int[n]; l new int[n] n int d=0; d 0 int ans=0; ans 0 for(int c=0;c<n;c++){
    		l[c]=sc.nextInt();
          	d+=l[c];
            if(d<=x){
            	ans++;
            }else{
            	break;
            }
    	} int c=0; int c=0; c 0 c<n c n c++ c++ c {
    		l[c]=sc.nextInt();
          	d+=l[c];
            if(d<=x){
            	ans++;
            }else{
            	break;
            }
    	} {
    		l[c]=sc.nextInt();
          	d+=l[c];
            if(d<=x){
            	ans++;
            }else{
            	break;
            }
    	} l[c]=sc.nextInt() l[c] l c sc.nextInt() sc.nextInt sc d+=l[c] d l[c] l c if(d<=x){
            	ans++;
            }else{
            	break;
            } d<=x d x {
            	ans++;
            } ans++ ans {
            	break;
            } break; System.out.println(ans+1) System.out.println System.out System System.out ans+1 ans 1 String[] args args
import java.util.*; 
 
class Main{
public static void main(String[] args){
	Scanner sc=new Scanner(System.in);
        int n=sc.nextInt();
        int x=sc.nextInt();
 
  		int[] l=new int[n];
  		int d=0;
  		int ans=0;
		for(int c=0;c<n;c++){
    		l[c]=sc.nextInt();
          	d+=l[c];
            if(d<=x){
            	ans++;
            }else{
            	break;
            }
    	}
    
    	System.out.println(ans+1);
    }
}
