import java.util.*;

public class Main {
    public static void main(String[] args){

        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int X = sc.nextInt();
        int count = 0;
        ArrayList<Integer> L = new ArrayList<>();
        ArrayList<Integer> D = new ArrayList<>();
        D.add(0);

        for (int i = 0; i < N; i++){
            L.add(sc.nextInt());
        }

        for (int i = 1; i < N + 1; i++){
            D.add(D.get(i-1) + L.get(i-1));
        }

        for (int i = 0; i < D.size(); i++){
            if(D.get(i)<=X){
                count++;
            }
        }

        System.out.print(count);
        sc.close();
    }

} 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 X = sc.nextInt();
        int count = 0;
        ArrayList<Integer> L = new ArrayList<>();
        ArrayList<Integer> D = new ArrayList<>();
        D.add(0);

        for (int i = 0; i < N; i++){
            L.add(sc.nextInt());
        }

        for (int i = 1; i < N + 1; i++){
            D.add(D.get(i-1) + L.get(i-1));
        }

        for (int i = 0; i < D.size(); i++){
            if(D.get(i)<=X){
                count++;
            }
        }

        System.out.print(count);
        sc.close();
    }

} Main public static void main(String[] args){

        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int X = sc.nextInt();
        int count = 0;
        ArrayList<Integer> L = new ArrayList<>();
        ArrayList<Integer> D = new ArrayList<>();
        D.add(0);

        for (int i = 0; i < N; i++){
            L.add(sc.nextInt());
        }

        for (int i = 1; i < N + 1; i++){
            D.add(D.get(i-1) + L.get(i-1));
        }

        for (int i = 0; i < D.size(); i++){
            if(D.get(i)<=X){
                count++;
            }
        }

        System.out.print(count);
        sc.close();
    } main {

        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int X = sc.nextInt();
        int count = 0;
        ArrayList<Integer> L = new ArrayList<>();
        ArrayList<Integer> D = new ArrayList<>();
        D.add(0);

        for (int i = 0; i < N; i++){
            L.add(sc.nextInt());
        }

        for (int i = 1; i < N + 1; i++){
            D.add(D.get(i-1) + L.get(i-1));
        }

        for (int i = 0; i < D.size(); i++){
            if(D.get(i)<=X){
                count++;
            }
        }

        System.out.print(count);
        sc.close();
    } 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 count = 0; count 0 ArrayList<Integer> L = new ArrayList<>(); L new ArrayList<>() ArrayList<Integer> D = new ArrayList<>(); D new ArrayList<>() D.add(0) D.add D 0 for (int i = 0; i < N; i++){
            L.add(sc.nextInt());
        } int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
            L.add(sc.nextInt());
        } {
            L.add(sc.nextInt());
        } L.add(sc.nextInt()) L.add L sc.nextInt() sc.nextInt sc for (int i = 1; i < N + 1; i++){
            D.add(D.get(i-1) + L.get(i-1));
        } int i = 1; int i = 1; i 1 i < N + 1 i N + 1 N 1 i++ i++ i {
            D.add(D.get(i-1) + L.get(i-1));
        } {
            D.add(D.get(i-1) + L.get(i-1));
        } D.add(D.get(i-1) + L.get(i-1)) D.add D D.get(i-1) + L.get(i-1) D.get(i-1) D.get D i-1 i 1 L.get(i-1) L.get L i-1 i 1 for (int i = 0; i < D.size(); i++){
            if(D.get(i)<=X){
                count++;
            }
        } int i = 0; int i = 0; i 0 i < D.size() i D.size() D.size D i++ i++ i {
            if(D.get(i)<=X){
                count++;
            }
        } {
            if(D.get(i)<=X){
                count++;
            }
        } if(D.get(i)<=X){
                count++;
            } D.get(i)<=X D.get(i) D.get D i X {
                count++;
            } count++ count System.out.print(count) System.out.print System.out System System.out count sc.close() sc.close sc 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 count = 0;
        ArrayList<Integer> L = new ArrayList<>();
        ArrayList<Integer> D = new ArrayList<>();
        D.add(0);

        for (int i = 0; i < N; i++){
            L.add(sc.nextInt());
        }

        for (int i = 1; i < N + 1; i++){
            D.add(D.get(i-1) + L.get(i-1));
        }

        for (int i = 0; i < D.size(); i++){
            if(D.get(i)<=X){
                count++;
            }
        }

        System.out.print(count);
        sc.close();
    }

} public class Main {
    public static void main(String[] args){

        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int X = sc.nextInt();
        int count = 0;
        ArrayList<Integer> L = new ArrayList<>();
        ArrayList<Integer> D = new ArrayList<>();
        D.add(0);

        for (int i = 0; i < N; i++){
            L.add(sc.nextInt());
        }

        for (int i = 1; i < N + 1; i++){
            D.add(D.get(i-1) + L.get(i-1));
        }

        for (int i = 0; i < D.size(); i++){
            if(D.get(i)<=X){
                count++;
            }
        }

        System.out.print(count);
        sc.close();
    }

} Main
import java.util.*;

public class Main {
    public static void main(String[] args){

        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int X = sc.nextInt();
        int count = 0;
        ArrayList<Integer> L = new ArrayList<>();
        ArrayList<Integer> D = new ArrayList<>();
        D.add(0);

        for (int i = 0; i < N; i++){
            L.add(sc.nextInt());
        }

        for (int i = 1; i < N + 1; i++){
            D.add(D.get(i-1) + L.get(i-1));
        }

        for (int i = 0; i < D.size(); i++){
            if(D.get(i)<=X){
                count++;
            }
        }

        System.out.print(count);
        sc.close();
    }

}