import java.util.*;

public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        int n = sc.nextInt();
        int x = sc.nextInt();
        List<Integer> l = new ArrayList<Integer>();

        for(int i = 0; i < n; i++){
            l.add(sc.nextInt());
        }

        int distance = 0;
        int cnt = 1;
        for(int i = 0; i < n; i++){
            distance += l.get(i);
            if(distance <= x) cnt++;
        }
        System.out.println(cnt);
        return;
    }
} import java.util.*; util.* java public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        int n = sc.nextInt();
        int x = sc.nextInt();
        List<Integer> l = new ArrayList<Integer>();

        for(int i = 0; i < n; i++){
            l.add(sc.nextInt());
        }

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

        int n = sc.nextInt();
        int x = sc.nextInt();
        List<Integer> l = new ArrayList<Integer>();

        for(int i = 0; i < n; i++){
            l.add(sc.nextInt());
        }

        int distance = 0;
        int cnt = 1;
        for(int i = 0; i < n; i++){
            distance += l.get(i);
            if(distance <= x) cnt++;
        }
        System.out.println(cnt);
        return;
    } main {
        Scanner sc = new Scanner(System.in);

        int n = sc.nextInt();
        int x = sc.nextInt();
        List<Integer> l = new ArrayList<Integer>();

        for(int i = 0; i < n; i++){
            l.add(sc.nextInt());
        }

        int distance = 0;
        int cnt = 1;
        for(int i = 0; i < n; i++){
            distance += l.get(i);
            if(distance <= x) cnt++;
        }
        System.out.println(cnt);
        return;
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc int x = sc.nextInt(); x sc.nextInt() sc.nextInt sc List<Integer> l = new ArrayList<Integer>(); l new ArrayList<Integer>() for(int i = 0; i < n; i++){
            l.add(sc.nextInt());
        } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
            l.add(sc.nextInt());
        } {
            l.add(sc.nextInt());
        } l.add(sc.nextInt()) l.add l sc.nextInt() sc.nextInt sc int distance = 0; distance 0 int cnt = 1; cnt 1 for(int i = 0; i < n; i++){
            distance += l.get(i);
            if(distance <= x) cnt++;
        } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
            distance += l.get(i);
            if(distance <= x) cnt++;
        } {
            distance += l.get(i);
            if(distance <= x) cnt++;
        } distance += l.get(i) distance l.get(i) l.get l i if(distance <= x) cnt++; distance <= x distance x cnt++ cnt System.out.println(cnt) System.out.println System.out System System.out cnt return; String[] args args public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        int n = sc.nextInt();
        int x = sc.nextInt();
        List<Integer> l = new ArrayList<Integer>();

        for(int i = 0; i < n; i++){
            l.add(sc.nextInt());
        }

        int distance = 0;
        int cnt = 1;
        for(int i = 0; i < n; i++){
            distance += l.get(i);
            if(distance <= x) cnt++;
        }
        System.out.println(cnt);
        return;
    }
} public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        int n = sc.nextInt();
        int x = sc.nextInt();
        List<Integer> l = new ArrayList<Integer>();

        for(int i = 0; i < n; i++){
            l.add(sc.nextInt());
        }

        int distance = 0;
        int cnt = 1;
        for(int i = 0; i < n; i++){
            distance += l.get(i);
            if(distance <= x) cnt++;
        }
        System.out.println(cnt);
        return;
    }
} Main
import java.util.*;

public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        int n = sc.nextInt();
        int x = sc.nextInt();
        List<Integer> l = new ArrayList<Integer>();

        for(int i = 0; i < n; i++){
            l.add(sc.nextInt());
        }

        int distance = 0;
        int cnt = 1;
        for(int i = 0; i < n; i++){
            distance += l.get(i);
            if(distance <= x) cnt++;
        }
        System.out.println(cnt);
        return;
    }
}
