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.stream.LongStream;
import java.util.StringTokenizer;
import java.io.IOException;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.InputStream;

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

    static class DPetyaAndArray {
        public int lower_bound (long[] a, int length, long key) {
            int left = 0, len = length, half = 0, mid = 0;
            while (len > 0) {
                half = len >> 1;
                mid = left + half;
                if (a[mid] < key) {
                    left = mid + 1;
                    len -= half + 1;
                } else {
                    len = half;
                }
            }
            return left;
        }

        public int upper_bound (long[] a, int length, long key) {
            int left = 0, len = length, half = 0, mid = 0;
            while (len > 0) {
                half = len >> 1;
                mid = left + half;
                if (a[mid] > key) {
                    len = half;
                } else {
                    len -= half + 1;
                    left = mid + 1;
                }
            }
            return left;
        }

        public void solve (int testNumber, InputReader in, PrintWriter out) {
            int n = in.nextInt();
            long t = in.nextLong(), tmp = 0;
            long[] a = in.nextLongArr(n), sum = new long[n + 1];
            // 将0计算在内有n + 1个部分和
            BIT bit = new BIT(n + 1);
            // 将部分和进行离散化，例如第一个例子的部分和去重之后是0 4 5 7 10 11（定义pref[0] = 0）
            for (int i = 0; i < n; ++i) {
                tmp += a[i];
                sum[i] = tmp;
            }
            sum[n] = 0;
            Arrays.sort(sum);
            sum = Arrays.stream(sum).distinct().sorted().toArray();
            long ans = 0;
            tmp = 0;
            // 预先添加pref[0]进去
            bit.add(lower_bound(sum, sum.length, 0) + 1, 1);
            for (int i = 0; i < n; ++i) {
                tmp += a[i];
                // 例如tmp = 5, t = 4, 对应的值为1，那么1在原sum数组中的upper_bound的idx = 1
                // 即BIT中截止到1的部分和（不包括1）为不满足当前R的L的个数，最后结果排除即可
                // +1就是为了完成从0到1的起始下标的转换
                int npos = upper_bound(sum, sum.length, tmp - t) + 1;
                // 因为0已经被添加了，从1开始，故是i + 1个
                // 然后对到npos的数据求和（不包括npos）就可以求出不符合的数据的个数
                ans += (i + 1) - bit.sum(0, npos - 1);
                // 然后对新的部分和进行离散化的坐标查询，并更新BIT
                int k = lower_bound(sum, sum.length, tmp) + 1;
                bit.add(k, 1);
            }
            out.println(ans);
        }

        class BIT {
            long[] ele;

            BIT (int n) {
                ele = new long[n + 1];
            }

            void add (int k, int a) {
                for (int i = k; i < ele.length; i += (i & (-i))) {
                    ele[i] += a;
                }
            }

            long sum (int s, int t) {
                if (s > 0) {
                    return sum(0, t) - sum(0, s);
                }
                long ans = 0;
                for (int i = t; i > 0; i -= (i & (-i))) {
                    ans += ele[i];
                }
                return ans;
            }

        }

    }

    static class InputReader {
        private BufferedReader reader;
        private StringTokenizer tokenizer;

        public InputReader (InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(stream), 100000);
            tokenizer = null;
        }

        public String next () {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
            return tokenizer.nextToken();
        }

        public long[] nextLongArr (int length) {
            long[] res = new long[length];
            for (int i = 0; i < length; ++i) {
                res[i] = nextLong();
            }
            return res;
        }

        public int nextInt () {
            return Integer.parseInt(next());
        }

        public long nextLong () {
            return Long.parseLong(next());
        }

    }
}

