import java.util.*;

public class Main{
    public static void main(String[] args){
        Scanner scan = new java.util.Scanner(System.in);
        int n = scan.nextInt();
        int x = scan.nextInt();
        int[] l = new int[n];
        int[] a = new int[n + 1];
        int b = 0;
        int c = 0;
        for(int i = 0; i < n; i++){
            l[i] = scan.nextInt();
            b += l[i];
            if(b <= x){
                c++;
            }
        }
        System.out.println(c + 1);
    }
} import java.util.*; util.* java public class Main{
    public static void main(String[] args){
        Scanner scan = new java.util.Scanner(System.in);
        int n = scan.nextInt();
        int x = scan.nextInt();
        int[] l = new int[n];
        int[] a = new int[n + 1];
        int b = 0;
        int c = 0;
        for(int i = 0; i < n; i++){
            l[i] = scan.nextInt();
            b += l[i];
            if(b <= x){
                c++;
            }
        }
        System.out.println(c + 1);
    }
} Main public static void main(String[] args){
        Scanner scan = new java.util.Scanner(System.in);
        int n = scan.nextInt();
        int x = scan.nextInt();
        int[] l = new int[n];
        int[] a = new int[n + 1];
        int b = 0;
        int c = 0;
        for(int i = 0; i < n; i++){
            l[i] = scan.nextInt();
            b += l[i];
            if(b <= x){
                c++;
            }
        }
        System.out.println(c + 1);
    } main {
        Scanner scan = new java.util.Scanner(System.in);
        int n = scan.nextInt();
        int x = scan.nextInt();
        int[] l = new int[n];
        int[] a = new int[n + 1];
        int b = 0;
        int c = 0;
        for(int i = 0; i < n; i++){
            l[i] = scan.nextInt();
            b += l[i];
            if(b <= x){
                c++;
            }
        }
        System.out.println(c + 1);
    } Scanner scan = new java.util.Scanner(System.in); scan new java.util.Scanner(System.in) int n = scan.nextInt(); n scan.nextInt() scan.nextInt scan int x = scan.nextInt(); x scan.nextInt() scan.nextInt scan int[] l = new int[n]; l new int[n] n int[] a = new int[n + 1]; a new int[n + 1] n + 1 n 1 int b = 0; b 0 int c = 0; c 0 for(int i = 0; i < n; i++){
            l[i] = scan.nextInt();
            b += l[i];
            if(b <= x){
                c++;
            }
        } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
            l[i] = scan.nextInt();
            b += l[i];
            if(b <= x){
                c++;
            }
        } {
            l[i] = scan.nextInt();
            b += l[i];
            if(b <= x){
                c++;
            }
        } l[i] = scan.nextInt() l[i] l i scan.nextInt() scan.nextInt scan b += l[i] b l[i] l i if(b <= x){
                c++;
            } b <= x b x {
                c++;
            } c++ c System.out.println(c + 1) System.out.println System.out System System.out c + 1 c 1 String[] args args public class Main{
    public static void main(String[] args){
        Scanner scan = new java.util.Scanner(System.in);
        int n = scan.nextInt();
        int x = scan.nextInt();
        int[] l = new int[n];
        int[] a = new int[n + 1];
        int b = 0;
        int c = 0;
        for(int i = 0; i < n; i++){
            l[i] = scan.nextInt();
            b += l[i];
            if(b <= x){
                c++;
            }
        }
        System.out.println(c + 1);
    }
} public class Main{
    public static void main(String[] args){
        Scanner scan = new java.util.Scanner(System.in);
        int n = scan.nextInt();
        int x = scan.nextInt();
        int[] l = new int[n];
        int[] a = new int[n + 1];
        int b = 0;
        int c = 0;
        for(int i = 0; i < n; i++){
            l[i] = scan.nextInt();
            b += l[i];
            if(b <= x){
                c++;
            }
        }
        System.out.println(c + 1);
    }
} Main
import java.util.*;

public class Main{
    public static void main(String[] args){
        Scanner scan = new java.util.Scanner(System.in);
        int n = scan.nextInt();
        int x = scan.nextInt();
        int[] l = new int[n];
        int[] a = new int[n + 1];
        int b = 0;
        int c = 0;
        for(int i = 0; i < n; i++){
            l[i] = scan.nextInt();
            b += l[i];
            if(b <= x){
                c++;
            }
        }
        System.out.println(c + 1);
    }
}