import java.io.*;
import java.util.*;
public class Main {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        int N,X;
        N = scan.nextInt();
        X = scan.nextInt();
        int [] L = new int [N];
        for(int i=0;i<N;i++){
            L[i] = scan.nextInt();
        }
        int [] D = new int [N+1];
        D[0] = 0;
        for(int i=1;i<=N;i++){
            D[i] = D[i-1] +L[i-1];
        }
        int count = 0;
        for(int i=0;i<=N;i++){
            if(D[i]<=X){
                count++;
            }
        }
        System.out.println(count);
    }
} import java.io.*; io.* java import java.util.*; util.* java public class Main {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        int N,X;
        N = scan.nextInt();
        X = scan.nextInt();
        int [] L = new int [N];
        for(int i=0;i<N;i++){
            L[i] = scan.nextInt();
        }
        int [] D = new int [N+1];
        D[0] = 0;
        for(int i=1;i<=N;i++){
            D[i] = D[i-1] +L[i-1];
        }
        int count = 0;
        for(int i=0;i<=N;i++){
            if(D[i]<=X){
                count++;
            }
        }
        System.out.println(count);
    }
} Main public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        int N,X;
        N = scan.nextInt();
        X = scan.nextInt();
        int [] L = new int [N];
        for(int i=0;i<N;i++){
            L[i] = scan.nextInt();
        }
        int [] D = new int [N+1];
        D[0] = 0;
        for(int i=1;i<=N;i++){
            D[i] = D[i-1] +L[i-1];
        }
        int count = 0;
        for(int i=0;i<=N;i++){
            if(D[i]<=X){
                count++;
            }
        }
        System.out.println(count);
    } main {
        Scanner scan = new Scanner(System.in);
        int N,X;
        N = scan.nextInt();
        X = scan.nextInt();
        int [] L = new int [N];
        for(int i=0;i<N;i++){
            L[i] = scan.nextInt();
        }
        int [] D = new int [N+1];
        D[0] = 0;
        for(int i=1;i<=N;i++){
            D[i] = D[i-1] +L[i-1];
        }
        int count = 0;
        for(int i=0;i<=N;i++){
            if(D[i]<=X){
                count++;
            }
        }
        System.out.println(count);
    } Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int N N X; X N = scan.nextInt() N scan.nextInt() scan.nextInt scan X = scan.nextInt() X scan.nextInt() scan.nextInt scan int [] L = new int [N]; L new int [N] N for(int i=0;i<N;i++){
            L[i] = scan.nextInt();
        } int i=0; int i=0; i 0 i<N i N i++ i++ i {
            L[i] = scan.nextInt();
        } {
            L[i] = scan.nextInt();
        } L[i] = scan.nextInt() L[i] L i scan.nextInt() scan.nextInt scan int [] D = new int [N+1]; D new int [N+1] N+1 N 1 D[0] = 0 D[0] D 0 0 for(int i=1;i<=N;i++){
            D[i] = D[i-1] +L[i-1];
        } int i=1; int i=1; i 1 i<=N i N i++ i++ i {
            D[i] = D[i-1] +L[i-1];
        } {
            D[i] = D[i-1] +L[i-1];
        } D[i] = D[i-1] +L[i-1] D[i] D i D[i-1] +L[i-1] D[i-1] D i-1 i 1 L[i-1] L i-1 i 1 int count = 0; count 0 for(int i=0;i<=N;i++){
            if(D[i]<=X){
                count++;
            }
        } int i=0; int i=0; i 0 i<=N i N i++ i++ i {
            if(D[i]<=X){
                count++;
            }
        } {
            if(D[i]<=X){
                count++;
            }
        } if(D[i]<=X){
                count++;
            } D[i]<=X D[i] D i X {
                count++;
            } count++ count System.out.println(count) System.out.println System.out System System.out count String[] args args public class Main {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        int N,X;
        N = scan.nextInt();
        X = scan.nextInt();
        int [] L = new int [N];
        for(int i=0;i<N;i++){
            L[i] = scan.nextInt();
        }
        int [] D = new int [N+1];
        D[0] = 0;
        for(int i=1;i<=N;i++){
            D[i] = D[i-1] +L[i-1];
        }
        int count = 0;
        for(int i=0;i<=N;i++){
            if(D[i]<=X){
                count++;
            }
        }
        System.out.println(count);
    }
} public class Main {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        int N,X;
        N = scan.nextInt();
        X = scan.nextInt();
        int [] L = new int [N];
        for(int i=0;i<N;i++){
            L[i] = scan.nextInt();
        }
        int [] D = new int [N+1];
        D[0] = 0;
        for(int i=1;i<=N;i++){
            D[i] = D[i-1] +L[i-1];
        }
        int count = 0;
        for(int i=0;i<=N;i++){
            if(D[i]<=X){
                count++;
            }
        }
        System.out.println(count);
    }
} Main
import java.io.*;
import java.util.*;
public class Main {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        int N,X;
        N = scan.nextInt();
        X = scan.nextInt();
        int [] L = new int [N];
        for(int i=0;i<N;i++){
            L[i] = scan.nextInt();
        }
        int [] D = new int [N+1];
        D[0] = 0;
        for(int i=1;i<=N;i++){
            D[i] = D[i-1] +L[i-1];
        }
        int count = 0;
        for(int i=0;i<=N;i++){
            if(D[i]<=X){
                count++;
            }
        }
        System.out.println(count);
    }
}