import java.util.*;

public class Main{
    public static void main(String[] args){
        Scanner scan = new Scanner(System.in);
        int n = scan.nextInt();
        int x = scan.nextInt();
        int[] l = new int[n];
        for(int i = 0; i < n; i++) l[i] = scan.nextInt();
        int p = 0;
        int c = 1;
        for(int i = 0; i < n; i++){
            p += l[i];
            if(p > x) break;
            c++;
        }
        System.out.println(c);
        scan.close();
    }
} import java.util.*; util.* java public class Main{
    public static void main(String[] args){
        Scanner scan = new Scanner(System.in);
        int n = scan.nextInt();
        int x = scan.nextInt();
        int[] l = new int[n];
        for(int i = 0; i < n; i++) l[i] = scan.nextInt();
        int p = 0;
        int c = 1;
        for(int i = 0; i < n; i++){
            p += l[i];
            if(p > x) break;
            c++;
        }
        System.out.println(c);
        scan.close();
    }
} Main public static void main(String[] args){
        Scanner scan = new Scanner(System.in);
        int n = scan.nextInt();
        int x = scan.nextInt();
        int[] l = new int[n];
        for(int i = 0; i < n; i++) l[i] = scan.nextInt();
        int p = 0;
        int c = 1;
        for(int i = 0; i < n; i++){
            p += l[i];
            if(p > x) break;
            c++;
        }
        System.out.println(c);
        scan.close();
    } main {
        Scanner scan = new Scanner(System.in);
        int n = scan.nextInt();
        int x = scan.nextInt();
        int[] l = new int[n];
        for(int i = 0; i < n; i++) l[i] = scan.nextInt();
        int p = 0;
        int c = 1;
        for(int i = 0; i < n; i++){
            p += l[i];
            if(p > x) break;
            c++;
        }
        System.out.println(c);
        scan.close();
    } Scanner scan = new Scanner(System.in); scan new 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 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] l i scan.nextInt() scan.nextInt scan int p = 0; p 0 int c = 1; c 1 for(int i = 0; i < n; i++){
            p += l[i];
            if(p > x) break;
            c++;
        } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
            p += l[i];
            if(p > x) break;
            c++;
        } {
            p += l[i];
            if(p > x) break;
            c++;
        } p += l[i] p l[i] l i if(p > x) break; p > x p x break; c++ c System.out.println(c) System.out.println System.out System System.out c scan.close() scan.close scan String[] args args public class Main{
    public static void main(String[] args){
        Scanner scan = new Scanner(System.in);
        int n = scan.nextInt();
        int x = scan.nextInt();
        int[] l = new int[n];
        for(int i = 0; i < n; i++) l[i] = scan.nextInt();
        int p = 0;
        int c = 1;
        for(int i = 0; i < n; i++){
            p += l[i];
            if(p > x) break;
            c++;
        }
        System.out.println(c);
        scan.close();
    }
} public class Main{
    public static void main(String[] args){
        Scanner scan = new Scanner(System.in);
        int n = scan.nextInt();
        int x = scan.nextInt();
        int[] l = new int[n];
        for(int i = 0; i < n; i++) l[i] = scan.nextInt();
        int p = 0;
        int c = 1;
        for(int i = 0; i < n; i++){
            p += l[i];
            if(p > x) break;
            c++;
        }
        System.out.println(c);
        scan.close();
    }
} Main
import java.util.*;

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