import java.util.*;
import java.math.*;
import java.io.*;


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


public class Main {
    static Scanner sc = new Scanner(System.in);
    public static void main(String args[]) {
        int n = sc.nextInt();
        int x = sc.nextInt();
        int[] l = new int[n];
        for(int i = 0; i < n; i++) {
            l[i] = sc.nextInt();
        }
        int now = 0;
        int ans = 1;
        for(int i = 0; i < n; i++) {
            now += l[i];
            if(now <= x) ans++; 
        }
        System.out.println(ans);
    } 
}