import java.util.Scanner;

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

        int N = sc.nextInt();
        int[] D = new int[N+1];
        int X = sc.nextInt();

        D[0] = 0;

        for (int i = 0; i < N; i++) {
            int Li = sc.nextInt();
            D[i + 1] = D[i] + Li;
        }

        int cnt = 0;

        for (int d : D) {
            if (d <= X)
                cnt++;
        }

        System.out.println(cnt);
    }
} import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        int N = sc.nextInt();
        int[] D = new int[N+1];
        int X = sc.nextInt();

        D[0] = 0;

        for (int i = 0; i < N; i++) {
            int Li = sc.nextInt();
            D[i + 1] = D[i] + Li;
        }

        int cnt = 0;

        for (int d : D) {
            if (d <= X)
                cnt++;
        }

        System.out.println(cnt);
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        int N = sc.nextInt();
        int[] D = new int[N+1];
        int X = sc.nextInt();

        D[0] = 0;

        for (int i = 0; i < N; i++) {
            int Li = sc.nextInt();
            D[i + 1] = D[i] + Li;
        }

        int cnt = 0;

        for (int d : D) {
            if (d <= X)
                cnt++;
        }

        System.out.println(cnt);
    } main {
        Scanner sc = new Scanner(System.in);

        int N = sc.nextInt();
        int[] D = new int[N+1];
        int X = sc.nextInt();

        D[0] = 0;

        for (int i = 0; i < N; i++) {
            int Li = sc.nextInt();
            D[i + 1] = D[i] + Li;
        }

        int cnt = 0;

        for (int d : D) {
            if (d <= X)
                cnt++;
        }

        System.out.println(cnt);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int N = sc.nextInt(); N sc.nextInt() sc.nextInt sc int[] D = new int[N+1]; D new int[N+1] N+1 N 1 int X = sc.nextInt(); X sc.nextInt() sc.nextInt sc D[0] = 0 D[0] D 0 0 for (int i = 0; i < N; i++) {
            int Li = sc.nextInt();
            D[i + 1] = D[i] + Li;
        } int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
            int Li = sc.nextInt();
            D[i + 1] = D[i] + Li;
        } {
            int Li = sc.nextInt();
            D[i + 1] = D[i] + Li;
        } int Li = sc.nextInt(); Li sc.nextInt() sc.nextInt sc D[i + 1] = D[i] + Li D[i + 1] D i + 1 i 1 D[i] + Li D[i] D i Li int cnt = 0; cnt 0 for (int d : D) {
            if (d <= X)
                cnt++;
        } int d D {
            if (d <= X)
                cnt++;
        } {
            if (d <= X)
                cnt++;
        } if (d <= X)
                cnt++; d <= X d X cnt++ cnt System.out.println(cnt) System.out.println System.out System System.out cnt String[] args args public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        int N = sc.nextInt();
        int[] D = new int[N+1];
        int X = sc.nextInt();

        D[0] = 0;

        for (int i = 0; i < N; i++) {
            int Li = sc.nextInt();
            D[i + 1] = D[i] + Li;
        }

        int cnt = 0;

        for (int d : D) {
            if (d <= X)
                cnt++;
        }

        System.out.println(cnt);
    }
} public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        int N = sc.nextInt();
        int[] D = new int[N+1];
        int X = sc.nextInt();

        D[0] = 0;

        for (int i = 0; i < N; i++) {
            int Li = sc.nextInt();
            D[i + 1] = D[i] + Li;
        }

        int cnt = 0;

        for (int d : D) {
            if (d <= X)
                cnt++;
        }

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

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

        int N = sc.nextInt();
        int[] D = new int[N+1];
        int X = sc.nextInt();

        D[0] = 0;

        for (int i = 0; i < N; i++) {
            int Li = sc.nextInt();
            D[i + 1] = D[i] + Li;
        }

        int cnt = 0;

        for (int d : D) {
            if (d <= X)
                cnt++;
        }

        System.out.println(cnt);
    }
}
