import java.util.Scanner;

public class Main{
    public static void main(String[] args) {
        Scanner in=new Scanner(System.in);
        int test=in.nextInt();
        int ar[]=new int[test];
        int n=in.nextInt();
        long sum=0;int count=1;
        for (int i = 0; i < test; i++) {
            ar[i]=in.nextInt();
            sum=sum+ar[i];
            if(sum<=n){
                count++;
            }
        }
        System.out.println(count);
    }
} import java.util.Scanner; Scanner java.util public class Main{
    public static void main(String[] args) {
        Scanner in=new Scanner(System.in);
        int test=in.nextInt();
        int ar[]=new int[test];
        int n=in.nextInt();
        long sum=0;int count=1;
        for (int i = 0; i < test; i++) {
            ar[i]=in.nextInt();
            sum=sum+ar[i];
            if(sum<=n){
                count++;
            }
        }
        System.out.println(count);
    }
} Main public static void main(String[] args) {
        Scanner in=new Scanner(System.in);
        int test=in.nextInt();
        int ar[]=new int[test];
        int n=in.nextInt();
        long sum=0;int count=1;
        for (int i = 0; i < test; i++) {
            ar[i]=in.nextInt();
            sum=sum+ar[i];
            if(sum<=n){
                count++;
            }
        }
        System.out.println(count);
    } main {
        Scanner in=new Scanner(System.in);
        int test=in.nextInt();
        int ar[]=new int[test];
        int n=in.nextInt();
        long sum=0;int count=1;
        for (int i = 0; i < test; i++) {
            ar[i]=in.nextInt();
            sum=sum+ar[i];
            if(sum<=n){
                count++;
            }
        }
        System.out.println(count);
    } Scanner in=new Scanner(System.in); in new Scanner(System.in) int test=in.nextInt(); test in.nextInt() in.nextInt in int ar[]=new int[test]; ar new int[test] test int n=in.nextInt(); n in.nextInt() in.nextInt in long sum=0; sum 0 int count=1; count 1 for (int i = 0; i < test; i++) {
            ar[i]=in.nextInt();
            sum=sum+ar[i];
            if(sum<=n){
                count++;
            }
        } int i = 0; int i = 0; i 0 i < test i test i++ i++ i {
            ar[i]=in.nextInt();
            sum=sum+ar[i];
            if(sum<=n){
                count++;
            }
        } {
            ar[i]=in.nextInt();
            sum=sum+ar[i];
            if(sum<=n){
                count++;
            }
        } ar[i]=in.nextInt() ar[i] ar i in.nextInt() in.nextInt in sum=sum+ar[i] sum sum+ar[i] sum ar[i] ar i if(sum<=n){
                count++;
            } sum<=n sum n {
                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 in=new Scanner(System.in);
        int test=in.nextInt();
        int ar[]=new int[test];
        int n=in.nextInt();
        long sum=0;int count=1;
        for (int i = 0; i < test; i++) {
            ar[i]=in.nextInt();
            sum=sum+ar[i];
            if(sum<=n){
                count++;
            }
        }
        System.out.println(count);
    }
} public class Main{
    public static void main(String[] args) {
        Scanner in=new Scanner(System.in);
        int test=in.nextInt();
        int ar[]=new int[test];
        int n=in.nextInt();
        long sum=0;int count=1;
        for (int i = 0; i < test; i++) {
            ar[i]=in.nextInt();
            sum=sum+ar[i];
            if(sum<=n){
                count++;
            }
        }
        System.out.println(count);
    }
} Main
import java.util.Scanner;

public class Main{
    public static void main(String[] args) {
        Scanner in=new Scanner(System.in);
        int test=in.nextInt();
        int ar[]=new int[test];
        int n=in.nextInt();
        long sum=0;int count=1;
        for (int i = 0; i < test; i++) {
            ar[i]=in.nextInt();
            sum=sum+ar[i];
            if(sum<=n){
                count++;
            }
        }
        System.out.println(count);
    }
}