import java.util.Scanner;

public class Main {

    public static void main(String args[]) {

        Scanner sc = new Scanner(System.in);
        int n = Integer.parseInt(sc.next());
        int x = Integer.parseInt(sc.next());
        Integer[] l = new Integer[n];
        for (int i = 0; i < n; i++) {
            l[i] = Integer.parseInt(sc.next());
        }

        int result = 1;
        int d = 0;
        for (int i = 0; i < n && d <= x; i++) {
            d += l[i];
            if (d <= x) {
                result++;
            }
        }

        System.out.println(result);
    }
} import java.util.Scanner; Scanner java.util public class Main {

    public static void main(String args[]) {

        Scanner sc = new Scanner(System.in);
        int n = Integer.parseInt(sc.next());
        int x = Integer.parseInt(sc.next());
        Integer[] l = new Integer[n];
        for (int i = 0; i < n; i++) {
            l[i] = Integer.parseInt(sc.next());
        }

        int result = 1;
        int d = 0;
        for (int i = 0; i < n && d <= x; i++) {
            d += l[i];
            if (d <= x) {
                result++;
            }
        }

        System.out.println(result);
    }
} Main public static void main(String args[]) {

        Scanner sc = new Scanner(System.in);
        int n = Integer.parseInt(sc.next());
        int x = Integer.parseInt(sc.next());
        Integer[] l = new Integer[n];
        for (int i = 0; i < n; i++) {
            l[i] = Integer.parseInt(sc.next());
        }

        int result = 1;
        int d = 0;
        for (int i = 0; i < n && d <= x; i++) {
            d += l[i];
            if (d <= x) {
                result++;
            }
        }

        System.out.println(result);
    } main {

        Scanner sc = new Scanner(System.in);
        int n = Integer.parseInt(sc.next());
        int x = Integer.parseInt(sc.next());
        Integer[] l = new Integer[n];
        for (int i = 0; i < n; i++) {
            l[i] = Integer.parseInt(sc.next());
        }

        int result = 1;
        int d = 0;
        for (int i = 0; i < n && d <= x; i++) {
            d += l[i];
            if (d <= x) {
                result++;
            }
        }

        System.out.println(result);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = Integer.parseInt(sc.next()); n Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc int x = Integer.parseInt(sc.next()); x Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc Integer[] l = new Integer[n]; l new Integer[n] n for (int i = 0; i < n; i++) {
            l[i] = Integer.parseInt(sc.next());
        } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
            l[i] = Integer.parseInt(sc.next());
        } {
            l[i] = Integer.parseInt(sc.next());
        } l[i] = Integer.parseInt(sc.next()) l[i] l i Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc int result = 1; result 1 int d = 0; d 0 for (int i = 0; i < n && d <= x; i++) {
            d += l[i];
            if (d <= x) {
                result++;
            }
        } int i = 0; int i = 0; i 0 i < n && d <= x i < n i n d <= x d x i++ i++ i {
            d += l[i];
            if (d <= x) {
                result++;
            }
        } {
            d += l[i];
            if (d <= x) {
                result++;
            }
        } d += l[i] d l[i] l i if (d <= x) {
                result++;
            } d <= x d x {
                result++;
            } result++ result System.out.println(result) System.out.println System.out System System.out result String args[] args public class Main {

    public static void main(String args[]) {

        Scanner sc = new Scanner(System.in);
        int n = Integer.parseInt(sc.next());
        int x = Integer.parseInt(sc.next());
        Integer[] l = new Integer[n];
        for (int i = 0; i < n; i++) {
            l[i] = Integer.parseInt(sc.next());
        }

        int result = 1;
        int d = 0;
        for (int i = 0; i < n && d <= x; i++) {
            d += l[i];
            if (d <= x) {
                result++;
            }
        }

        System.out.println(result);
    }
} public class Main {

    public static void main(String args[]) {

        Scanner sc = new Scanner(System.in);
        int n = Integer.parseInt(sc.next());
        int x = Integer.parseInt(sc.next());
        Integer[] l = new Integer[n];
        for (int i = 0; i < n; i++) {
            l[i] = Integer.parseInt(sc.next());
        }

        int result = 1;
        int d = 0;
        for (int i = 0; i < n && d <= x; i++) {
            d += l[i];
            if (d <= x) {
                result++;
            }
        }

        System.out.println(result);
    }
} Main
import java.util.Scanner;

public class Main {

    public static void main(String args[]) {

        Scanner sc = new Scanner(System.in);
        int n = Integer.parseInt(sc.next());
        int x = Integer.parseInt(sc.next());
        Integer[] l = new Integer[n];
        for (int i = 0; i < n; i++) {
            l[i] = Integer.parseInt(sc.next());
        }

        int result = 1;
        int d = 0;
        for (int i = 0; i < n && d <= x; i++) {
            d += l[i];
            if (d <= x) {
                result++;
            }
        }

        System.out.println(result);
    }
}
