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 
#include <bits/stdc++.h>
using namespace std;
#pragma GCC optimize("O2")
#pragma GCC optimize("unroll-loops")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#pragma GCC target("avx2")
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
const int RANDOM =
    chrono::high_resolution_clock::now().time_since_epoch().count();
struct chash {
  int operator()(int x) const { return x ^ RANDOM; }
};
const int mod = 1e9 + 7;
const int mxN = 2e5 + 5;
struct node {
  long long val, left, right;
  node() { val = left = right = 0; }
};
const int mxNodes = 25 * mxN;
vector<node> nodes(mxNodes);
int counter = 0;
class DynPersistentSegTree {
 public:
  int start_root;
  vector<int> roots;
  long long n;
  DynPersistentSegTree() {
    start_root = 0;
    roots.push_back(start_root);
  }
  ~DynPersistentSegTree() {}
  int inline getRoot() { return roots.back(); }
  void update(long long curr, long long nxtV, long long l, long long r,
              long long idx, long long diff) {
    if (l == r) {
      nodes[nxtV].val = nodes[curr].val + diff;
      return;
    }
    long long mid = l + ((r - l) >> 1);
    if (l <= idx && idx <= mid) {
      nodes[nxtV].left = ++counter;
      nodes[nxtV].right = nodes[curr].right;
      update(nodes[curr].left, nodes[nxtV].left, l, mid, idx, diff);
    }
    if (mid + 1 <= idx && idx <= r) {
      nodes[nxtV].right = ++counter;
      nodes[nxtV].left = nodes[curr].left;
      update(nodes[curr].right, nodes[nxtV].right, mid + 1, r, idx, diff);
    }
    nodes[nxtV].val =
        nodes[nodes[nxtV].left].val + nodes[nodes[nxtV].right].val;
  }
  void inline upd(long long idx, long long diff) {
    int latest_root = roots.back();
    int new_Version_root = ++counter;
    update(latest_root, new_Version_root, 0, n - 1, idx, diff);
    roots.push_back(new_Version_root);
  }
  long long query(long long curr, long long l, long long r, long long L,
                  long long R) {
    if (!curr) return 0;
    if (L <= l && r <= R) {
      return nodes[curr].val;
    }
    long long mid = l + ((r - l) >> 1);
    return (!(mid < L || R < l) ? query(nodes[curr].left, l, mid, L, R) : 0) +
           (!(r < L || R < mid + 1) ? query(nodes[curr].right, mid + 1, r, L, R)
                                    : 0);
  }
  long long inline qry(long long groot, long long L, long long R) {
    return query(groot, 0, n - 1, L, R);
  }
  int mquery(int curr, int l, int r, int upto) {
    if (l == r) {
      return r;
    }
    int mid = l + ((r - l) >> 1);
    if (nodes[nodes[curr].left].val < upto) {
      return mquery(nodes[curr].right, mid + 1, r,
                    upto - nodes[nodes[curr].left].val);
    } else {
      return mquery(nodes[curr].left, l, mid, upto);
    }
  }
  int getIdx(int groot, int k) { return 1 + mquery(groot, 0, n - 1, k); }
};
void solve(int tt) {
  long long cnt = 0, sum = 0, n, t;
  cin >> n >> t;
  vector<long long> pref(n);
  map<long long, int> hmp;
  hmp[0] = 1;
  for (long long& x : pref) {
    cin >> x;
    sum += x;
    x = sum;
    hmp[sum] = 1;
    hmp[sum - t] = 1;
  }
  DynPersistentSegTree seg;
  seg.n = hmp.size();
  int ptr = 0;
  for (auto& it : hmp) {
    it.second = ptr++;
  }
  seg.upd(hmp[0], 1);
  ptr = 1;
  for (long long& sum : pref) {
    cnt += (ptr++) - seg.qry(seg.roots.back(), 0, hmp[sum - t]);
    seg.upd(hmp[sum], 1);
  }
  cout << cnt << "\n";
}
int main() {
  int tt = 0, t = 1;
  while (t--) {
    solve(++tt);
  }
  cerr << "processor time: " << clock() / (double)CLOCKS_PER_SEC << "s    ";
  return 0;
}
