Petya has an array a consisting of n integers. He has learned partial sums recently, and now he can calculate the sum of elements on any segment of the array really fast. The segment is a non-empty sequence of elements standing one next to another in the array.

Now he wonders what is the number of segments in his array with the sum less than t. Help Petya to calculate this number.

More formally, you are required to calculate the number of pairs l, r (l ≤ r) such that a_l + a_{l+1} + ... + a_{r-1} + a_r < t.

Input

The first line contains two integers n and t (1 ≤ n ≤ 200 000, |t| ≤ 2⋅10^{14}).

The second line contains a sequence of integers a_1, a_2, ..., a_n (|a_{i}| ≤ 10^{9}) — the description of Petya's array. Note that there might be negative, zero and positive elements.

Output

Print the number of segments in Petya's array with the sum of elements less than t.

Examples

Input

5 4
5 -1 3 4 -1


Output

5


Input

3 0
-1 2 -3


Output

4


Input

4 -1
-2 1 -2 3


Output

3

Note

In the first example the following segments have sum less than 4:

  * [2, 2], sum of elements is -1 
  * [2, 3], sum of elements is 2 
  * [3, 3], sum of elements is 3 
  * [4, 5], sum of elements is 3 
  * [5, 5], sum of elements is -1 
import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.io.BufferedWriter;
import java.util.InputMismatchException;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import java.io.Writer;
import java.io.OutputStreamWriter;
import java.util.Collections;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author prakharjain
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        OutputWriter out = new OutputWriter(outputStream);
        TaskD solver = new TaskD();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskD {
        public void solve(int testNumber, InputReader in, OutputWriter out) {
            int n = in.nextInt();

            long t = in.nextLong();

            int[] a = new int[n];

            List<Long> al = new ArrayList<>();

            for (int i = 0; i < n; i++) {
                a[i] = in.nextInt();
            }

            long[] suf = new long[n];

            suf[n - 1] = a[n - 1];
            for (int i = n - 2; i >= 0; i--) {
                suf[i] = suf[i + 1] + a[i];
            }

            for (int i = 0; i < n; i++) {
                al.add(suf[i]);
            }

            long ans = 0;

            if (a[0] < t) {
                ans++;
            }

            MergeSortTree mst = new MergeSortTree(n);
            mst.build(0, al, 0, n - 1);

            for (int i = 1; i < n; i++) {
                if (a[i] < t) {
                    ans++;
                }
                long x = a[i];
                long y = 0;
                if (i < n - 1) {
                    y = suf[i + 1];
                }
                ans += mst.query(0, 0, n - 1, 0, i - 1, t + y);
            }

            out.println(ans);
        }

        class MergeSortTree {
            List[] st;
            int n;

            public MergeSortTree(int n) {
                st = new List[4 * n];
                this.n = n;
            }

            void build(int i, List<Long> a, int r1, int r2) {
                if (r1 == r2) {
                    st[i] = Collections.singletonList(a.get(r1));
                } else {
                    build(i * 2 + 1, a, r1, (r1 + r2) / 2);
                    build(i * 2 + 2, a, (r1 + r2) / 2 + 1, r2);

                    st[i] = new ArrayList<Long>();

                    mergeSortedLists(st[i * 2 + 1], st[i * 2 + 2], st[i]);
                }
            }

            private List<Long> mergeSortedLists(List<Long> l1,
                                                List<Long> l2, List<Long> lm) {
                int j = 0, k = 0;
                for (; j < l1.size() && k < l2.size(); ) {
                    if ((long) l1.get(j) <= (long) l2.get(k)) {
                        lm.add(l1.get(j));
                        j++;
                    } else {
                        lm.add(l2.get(k));
                        k++;
                    }
                }

                while (j < l1.size()) {
                    lm.add(l1.get(j));
                    j++;
                }

                while (k < l2.size()) {
                    lm.add(l2.get(k));
                    k++;
                }

                return lm;
            }

            int query(int i, int ra, int rb, int r1, int r2, long num) {
                if (ra > r2 || rb < r1) {
                    return 0;
                }

                if (ra >= r1 && rb <= r2) {
                    return lessthan_BS(num, st[i]);
                }

                int p1 = query(i * 2 + 1, ra, (ra + rb) / 2, r1, r2, num);
                int p2 = query(i * 2 + 2, (ra + rb) / 2 + 1, rb, r1, r2, num);

                return p1 + p2;
            }

            int lessthan_BS(long num, List<Long> l) {
                int lo = 0;
                int hi = l.size() - 1;

                int maxi = -1;

                while (lo <= hi) {
                    int mid = (lo + hi) / 2;

                    if (l.get(mid) < num) {
                        maxi = Math.max(maxi, mid);
                        lo = mid + 1;
                    } else {
                        hi = mid - 1;
                    }
                }

                return maxi + 1;
            }

        }

    }

    static class InputReader {
        private InputStream stream;
        private byte[] buf = new byte[1024];
        private int curChar;
        private int numChars;
        private InputReader.SpaceCharFilter filter;

        public InputReader(InputStream stream) {
            this.stream = stream;
        }

        public static boolean isWhitespace(int c) {
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

        public int read() {
            if (numChars == -1) {
                throw new InputMismatchException();
            }
            if (curChar >= numChars) {
                curChar = 0;
                try {
                    numChars = stream.read(buf);
                } catch (IOException e) {
                    throw new InputMismatchException();
                }
                if (numChars <= 0) {
                    return -1;
                }
            }
            return buf[curChar++];
        }

        public int nextInt() {
            int c = read();
            while (isSpaceChar(c)) {
                c = read();
            }
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            int res = 0;
            do {
                if (c < '0' || c > '9') {
                    throw new InputMismatchException();
                }
                res *= 10;
                res += c - '0';
                c = read();
            } while (!isSpaceChar(c));
            return res * sgn;
        }

        public long nextLong() {
            int c = read();
            while (isSpaceChar(c)) {
                c = read();
            }
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            long res = 0;
            do {
                if (c < '0' || c > '9') {
                    throw new InputMismatchException();
                }
                res *= 10;
                res += c - '0';
                c = read();
            } while (!isSpaceChar(c));
            return res * sgn;
        }

        public boolean isSpaceChar(int c) {
            if (filter != null) {
                return filter.isSpaceChar(c);
            }
            return isWhitespace(c);
        }

        public interface SpaceCharFilter {
            public boolean isSpaceChar(int ch);

        }

    }

    static class OutputWriter {
        private final PrintWriter writer;

        public OutputWriter(OutputStream outputStream) {
            writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));
        }

        public OutputWriter(Writer writer) {
            this.writer = new PrintWriter(writer);
        }

        public void close() {
            writer.close();
        }

        public void println(long i) {
            writer.println(i);
        }

    }
}

