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.PrintWriter;import java.util.Arrays;import java.util.SplittableRandom;import java.util.InputMismatchException;import java.io.IOException;import java.io.InputStream;/** * Built using CHelper plug-in * Actual solution is at the top */public class Main {    public static void main(String[] args) {        InputStream inputStream = System.in;        OutputStream outputStream = System.out;        FastReader in = new FastReader(inputStream);        PrintWriter out = new PrintWriter(outputStream);        TaskD solver = new TaskD();        solver.solve(1, in, out);        out.close();    }    static class TaskD {        public void solve(int testNumber, FastReader in, PrintWriter out) {            int n = in.nextInt();            long ans = 0;            long t = in.nextLong();            long[] a = new long[n];            for (int i = 0; i < a.length; i++) {                a[i] = in.nextLong();            }            long[] sum = new long[n + 1];            for (int i = 1; i < sum.length; i++) {                sum[i] = sum[i - 1] + a[i - 1];            }            long[] s = sum.clone();            ArrayUtils.sort(s);            FenwickTreeL fenwickTreeL = new FenwickTreeL(n + 1);            for (int i = 0; i < s.length; i++) {                if (i > 0) {                    int l = -1;                    int r = n + 1;                    while (l + 1 < r) {                        int m = (l + r) / 2;                        if (s[m] <= sum[i] - t) {                            l = m;                        } else {                            r = m;                        }                    }                    ans += i - fenwickTreeL.getSum(l);                }                int l = -1;                int r = n + 1;                while (l + 1 < r) {                    int m = (l + r) / 2;                    if (s[m] <= sum[i]) {                        l = m;                    } else {                        r = m;                    }                }                fenwickTreeL.add(l, 1);            }            out.println(ans);        }    }    static class FastReader {        private InputStream stream;        private byte[] buf = new byte[8192];        private int curChar;        private int pnumChars;        public FastReader(InputStream stream) {            this.stream = stream;        }        private int pread() {            if (pnumChars == -1) {                throw new InputMismatchException();            }            if (curChar >= pnumChars) {                curChar = 0;                try {                    pnumChars = stream.read(buf);                } catch (IOException e) {                    throw new InputMismatchException();                }                if (pnumChars <= 0) {                    return -1;                }            }            return buf[curChar++];        }        public int nextInt() {            int c = pread();            while (isSpaceChar(c))                c = pread();            int sgn = 1;            if (c == '-') {                sgn = -1;                c = pread();            }            int res = 0;            do {                if (c == ',') {                    c = pread();                }                if (c < '0' || c > '9') {                    throw new InputMismatchException();                }                res *= 10;                res += c - '0';                c = pread();            } while (!isSpaceChar(c));            return res * sgn;        }        public long nextLong() {            int c = pread();            while (isSpaceChar(c))                c = pread();            int sgn = 1;            if (c == '-') {                sgn = -1;                c = pread();            }            long res = 0;            do {                if (c < '0' || c > '9') {                    throw new InputMismatchException();                }                res *= 10;                res += c - '0';                c = pread();            } while (!isSpaceChar(c));            return res * sgn;        }        private boolean isSpaceChar(int c) {            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;        }    }    static class ArrayUtils {        public static long[] sort(long[] a) {            a = shuffle(a, new SplittableRandom());            Arrays.sort(a);            return a;        }        public static long[] shuffle(long[] a, SplittableRandom gen) {            for (int i = 0, n = a.length; i < n; i++) {                int ind = gen.nextInt(n - i) + i;                long d = a[i];                a[i] = a[ind];                a[ind] = d;            }            return a;        }    }    static class FenwickTreeL {        public long[] fen;        public int N;        public FenwickTreeL(long[] a) {            N = a.length;            fen = new long[N + 1];            for (int i = 0; i < N; i++) {                for (int x = i + 1; x <= N; x += x & (-x)) {                    fen[x] += a[i];                }            }        }        public FenwickTreeL(int n) {            N = n;            fen = new long[N + 1];        }        public void add(int ind, long val) {            if (val == 0) return;            for (int x = ind + 1; x <= N; x += x & (-x)) {                fen[x] += val;            }        }        public long getSum(int ind) {            long sum = 0;            for (int x = ind + 1; x > 0; x -= x & (-x)) {                sum += fen[x];            }            return sum;        }    }}
