import java.util.*;

public class Main {
    public static void main(String[] args) {

        int sum = 0;
        int sumN = 1;
        int prevL = 0;

        Scanner sc = new Scanner(System.in);
        int n = Integer.parseInt(sc.next());
        int x = Integer.parseInt(sc.next());
        ArrayList<Integer> ary = new ArrayList<>();
        ary.add(0);

        for (int i = 1 ; i < n + 1 ; i ++) {
            int l = Integer.parseInt(sc.next());
            sum = prevL + l;
            if (sum <= x) {
                ary.add(0);
            }
            prevL = sum;
        }
        System.out.print(ary.size());
    }
} import java.util.*; util.* java public class Main {
    public static void main(String[] args) {

        int sum = 0;
        int sumN = 1;
        int prevL = 0;

        Scanner sc = new Scanner(System.in);
        int n = Integer.parseInt(sc.next());
        int x = Integer.parseInt(sc.next());
        ArrayList<Integer> ary = new ArrayList<>();
        ary.add(0);

        for (int i = 1 ; i < n + 1 ; i ++) {
            int l = Integer.parseInt(sc.next());
            sum = prevL + l;
            if (sum <= x) {
                ary.add(0);
            }
            prevL = sum;
        }
        System.out.print(ary.size());
    }
} Main public static void main(String[] args) {

        int sum = 0;
        int sumN = 1;
        int prevL = 0;

        Scanner sc = new Scanner(System.in);
        int n = Integer.parseInt(sc.next());
        int x = Integer.parseInt(sc.next());
        ArrayList<Integer> ary = new ArrayList<>();
        ary.add(0);

        for (int i = 1 ; i < n + 1 ; i ++) {
            int l = Integer.parseInt(sc.next());
            sum = prevL + l;
            if (sum <= x) {
                ary.add(0);
            }
            prevL = sum;
        }
        System.out.print(ary.size());
    } main {

        int sum = 0;
        int sumN = 1;
        int prevL = 0;

        Scanner sc = new Scanner(System.in);
        int n = Integer.parseInt(sc.next());
        int x = Integer.parseInt(sc.next());
        ArrayList<Integer> ary = new ArrayList<>();
        ary.add(0);

        for (int i = 1 ; i < n + 1 ; i ++) {
            int l = Integer.parseInt(sc.next());
            sum = prevL + l;
            if (sum <= x) {
                ary.add(0);
            }
            prevL = sum;
        }
        System.out.print(ary.size());
    } int sum = 0; sum 0 int sumN = 1; sumN 1 int prevL = 0; prevL 0 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 ArrayList<Integer> ary = new ArrayList<>(); ary new ArrayList<>() ary.add(0) ary.add ary 0 for (int i = 1 ; i < n + 1 ; i ++) {
            int l = Integer.parseInt(sc.next());
            sum = prevL + l;
            if (sum <= x) {
                ary.add(0);
            }
            prevL = sum;
        } int i = 1 ; int i = 1 ; i 1 i < n + 1 i n + 1 n 1 i ++ i ++ i {
            int l = Integer.parseInt(sc.next());
            sum = prevL + l;
            if (sum <= x) {
                ary.add(0);
            }
            prevL = sum;
        } {
            int l = Integer.parseInt(sc.next());
            sum = prevL + l;
            if (sum <= x) {
                ary.add(0);
            }
            prevL = sum;
        } int l = Integer.parseInt(sc.next()); l Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc sum = prevL + l sum prevL + l prevL l if (sum <= x) {
                ary.add(0);
            } sum <= x sum x {
                ary.add(0);
            } ary.add(0) ary.add ary 0 prevL = sum prevL sum System.out.print(ary.size()) System.out.print System.out System System.out ary.size() ary.size ary String[] args args public class Main {
    public static void main(String[] args) {

        int sum = 0;
        int sumN = 1;
        int prevL = 0;

        Scanner sc = new Scanner(System.in);
        int n = Integer.parseInt(sc.next());
        int x = Integer.parseInt(sc.next());
        ArrayList<Integer> ary = new ArrayList<>();
        ary.add(0);

        for (int i = 1 ; i < n + 1 ; i ++) {
            int l = Integer.parseInt(sc.next());
            sum = prevL + l;
            if (sum <= x) {
                ary.add(0);
            }
            prevL = sum;
        }
        System.out.print(ary.size());
    }
} public class Main {
    public static void main(String[] args) {

        int sum = 0;
        int sumN = 1;
        int prevL = 0;

        Scanner sc = new Scanner(System.in);
        int n = Integer.parseInt(sc.next());
        int x = Integer.parseInt(sc.next());
        ArrayList<Integer> ary = new ArrayList<>();
        ary.add(0);

        for (int i = 1 ; i < n + 1 ; i ++) {
            int l = Integer.parseInt(sc.next());
            sum = prevL + l;
            if (sum <= x) {
                ary.add(0);
            }
            prevL = sum;
        }
        System.out.print(ary.size());
    }
} Main
import java.util.*;

public class Main {
    public static void main(String[] args) {

        int sum = 0;
        int sumN = 1;
        int prevL = 0;

        Scanner sc = new Scanner(System.in);
        int n = Integer.parseInt(sc.next());
        int x = Integer.parseInt(sc.next());
        ArrayList<Integer> ary = new ArrayList<>();
        ary.add(0);

        for (int i = 1 ; i < n + 1 ; i ++) {
            int l = Integer.parseInt(sc.next());
            sum = prevL + l;
            if (sum <= x) {
                ary.add(0);
            }
            prevL = sum;
        }
        System.out.print(ary.size());
    }
}