import java.util.*;

public class Main {
    public static void main(String[] args){
    
    Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int K = sc.nextInt();
        int[]L = new int[N];

        int cou =1;
        int wa = 0;
        for(int i=0; i<N; i++){   
            L[i] = sc.nextInt();
             wa += L[i];
            if(wa<=K){
                    cou++;
        } 
    }        
	System.out.println(cou);
      }
} import java.util.*; util.* java public class Main {
    public static void main(String[] args){
    
    Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int K = sc.nextInt();
        int[]L = new int[N];

        int cou =1;
        int wa = 0;
        for(int i=0; i<N; i++){   
            L[i] = sc.nextInt();
             wa += L[i];
            if(wa<=K){
                    cou++;
        } 
    }        
	System.out.println(cou);
      }
} Main public static void main(String[] args){
    
    Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int K = sc.nextInt();
        int[]L = new int[N];

        int cou =1;
        int wa = 0;
        for(int i=0; i<N; i++){   
            L[i] = sc.nextInt();
             wa += L[i];
            if(wa<=K){
                    cou++;
        } 
    }        
	System.out.println(cou);
      } main {
    
    Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int K = sc.nextInt();
        int[]L = new int[N];

        int cou =1;
        int wa = 0;
        for(int i=0; i<N; i++){   
            L[i] = sc.nextInt();
             wa += L[i];
            if(wa<=K){
                    cou++;
        } 
    }        
	System.out.println(cou);
      } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int N = sc.nextInt(); N sc.nextInt() sc.nextInt sc int K = sc.nextInt(); K sc.nextInt() sc.nextInt sc int[]L = new int[N]; L new int[N] N int cou =1; cou 1 int wa = 0; wa 0 for(int i=0; i<N; i++){   
            L[i] = sc.nextInt();
             wa += L[i];
            if(wa<=K){
                    cou++;
        } 
    } int i=0; int i=0; i 0 i<N i N i++ i++ i {   
            L[i] = sc.nextInt();
             wa += L[i];
            if(wa<=K){
                    cou++;
        } 
    } {   
            L[i] = sc.nextInt();
             wa += L[i];
            if(wa<=K){
                    cou++;
        } 
    } L[i] = sc.nextInt() L[i] L i sc.nextInt() sc.nextInt sc wa += L[i] wa L[i] L i if(wa<=K){
                    cou++;
        } wa<=K wa K {
                    cou++;
        } cou++ cou System.out.println(cou) System.out.println System.out System System.out cou String[] args args public class Main {
    public static void main(String[] args){
    
    Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int K = sc.nextInt();
        int[]L = new int[N];

        int cou =1;
        int wa = 0;
        for(int i=0; i<N; i++){   
            L[i] = sc.nextInt();
             wa += L[i];
            if(wa<=K){
                    cou++;
        } 
    }        
	System.out.println(cou);
      }
} public class Main {
    public static void main(String[] args){
    
    Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int K = sc.nextInt();
        int[]L = new int[N];

        int cou =1;
        int wa = 0;
        for(int i=0; i<N; i++){   
            L[i] = sc.nextInt();
             wa += L[i];
            if(wa<=K){
                    cou++;
        } 
    }        
	System.out.println(cou);
      }
} Main
import java.util.*;

public class Main {
    public static void main(String[] args){
    
    Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int K = sc.nextInt();
        int[]L = new int[N];

        int cou =1;
        int wa = 0;
        for(int i=0; i<N; i++){   
            L[i] = sc.nextInt();
             wa += L[i];
            if(wa<=K){
                    cou++;
        } 
    }        
	System.out.println(cou);
      }
}
