import java.util.*;
import java.lang.*;
import java.io.*;

public 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 sum = 0;
        int bn = 1;
        
        for(int i = 0; i<N; i++){
            L[i]= sc.nextInt();       
        }

        for(int j = 0; j<N; j++){
            sum += L[j];

            if(sum <= X){
                bn++;
            }
                
        }

        System.out.println(bn);

    }
} import java.util.*; util.* java import java.lang.*; lang.* java import java.io.*; io.* java public 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 sum = 0;
        int bn = 1;
        
        for(int i = 0; i<N; i++){
            L[i]= sc.nextInt();       
        }

        for(int j = 0; j<N; j++){
            sum += L[j];

            if(sum <= X){
                bn++;
            }
                
        }

        System.out.println(bn);

    }
} 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 sum = 0;
        int bn = 1;
        
        for(int i = 0; i<N; i++){
            L[i]= sc.nextInt();       
        }

        for(int j = 0; j<N; j++){
            sum += L[j];

            if(sum <= X){
                bn++;
            }
                
        }

        System.out.println(bn);

    } main {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int X = sc.nextInt();
        int[] L = new int[N];

        int sum = 0;
        int bn = 1;
        
        for(int i = 0; i<N; i++){
            L[i]= sc.nextInt();       
        }

        for(int j = 0; j<N; j++){
            sum += L[j];

            if(sum <= X){
                bn++;
            }
                
        }

        System.out.println(bn);

    } 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 sum = 0; sum 0 int bn = 1; bn 1 for(int i = 0; i<N; i++){
            L[i]= sc.nextInt();       
        } int i = 0; int i = 0; i 0 i<N i N i++ i++ i {
            L[i]= sc.nextInt();       
        } {
            L[i]= sc.nextInt();       
        } L[i]= sc.nextInt() L[i] L i sc.nextInt() sc.nextInt sc for(int j = 0; j<N; j++){
            sum += L[j];

            if(sum <= X){
                bn++;
            }
                
        } int j = 0; int j = 0; j 0 j<N j N j++ j++ j {
            sum += L[j];

            if(sum <= X){
                bn++;
            }
                
        } {
            sum += L[j];

            if(sum <= X){
                bn++;
            }
                
        } sum += L[j] sum L[j] L j if(sum <= X){
                bn++;
            } sum <= X sum X {
                bn++;
            } bn++ bn System.out.println(bn) System.out.println System.out System System.out bn String[] args args public 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 sum = 0;
        int bn = 1;
        
        for(int i = 0; i<N; i++){
            L[i]= sc.nextInt();       
        }

        for(int j = 0; j<N; j++){
            sum += L[j];

            if(sum <= X){
                bn++;
            }
                
        }

        System.out.println(bn);

    }
} public 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 sum = 0;
        int bn = 1;
        
        for(int i = 0; i<N; i++){
            L[i]= sc.nextInt();       
        }

        for(int j = 0; j<N; j++){
            sum += L[j];

            if(sum <= X){
                bn++;
            }
                
        }

        System.out.println(bn);

    }
} Main
import java.util.*;
import java.lang.*;
import java.io.*;

public 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 sum = 0;
        int bn = 1;
        
        for(int i = 0; i<N; i++){
            L[i]= sc.nextInt();       
        }

        for(int j = 0; j<N; j++){
            sum += L[j];

            if(sum <= X){
                bn++;
            }
                
        }

        System.out.println(bn);

    }
}
