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;
template <class T>
using VV = vector<vector<T>>;
template <class T>
inline bool SMIN(T &l, const T &r) {
  return l < r ? l = r, 1 : 0;
}
template <class T>
inline bool SMAX(T &l, const T &r) {
  return l > r ? l = r, 1 : 0;
}
const int MAX_N = 2e5 + 1;
long long A[MAX_N];
long long S;
int N;
struct BIT {
 public:
  int N;
  vector<int> T;
  BIT(int N) : N(N) { T = vector<int>(N + 1, 0); }
  int query(int r) {
    ++r;
    int res = 0;
    while (r > 0) {
      res += T[r];
      r -= lsone(r);
    }
    return res;
  }
  int query(int l, int r) {
    assert(l <= r && 0 <= l && r < N);
    return query(r) - query(l - 1);
  }
  void add(int i, int x) {
    assert(0 <= i && i <= N);
    ++i;
    while (i <= N) {
      T[i] += x;
      i += lsone(i);
    }
  }
  void update(int i, int x) {
    int v1 = query(i) - query(i - 1);
    add(i, x - v1);
  }
  int inversions(vector<int> ns) {
    int N = ns.size(), res = 0;
    for (int i = N - 1; i >= 0; --i) {
      res += query(ns[i] - 1);
      add(ns[i], 1);
    }
    return res;
  }

 private:
  int lsone(int i) { return i & -i; }
};
long long solve() {
  vector<long long> sums(1, 0);
  long long sum = 0;
  for (int i = 0; i < (N); ++i) sum += A[i], sums.emplace_back(sum);
  sort(sums.begin(), sums.end());
  sums.erase(unique(sums.begin(), sums.end()), sums.end());
  int M = int((sums).size());
  map<long long, int> T;
  for (int i = 0; i < (int((sums).size())); ++i) T[sums[i]] = i;
  BIT bit(M + 10);
  bit.add(T[0], 1);
  long long res = 0;
  sum = 0;
  for (int i = 0; i < (N); ++i) {
    sum += A[i];
    long long lb = sum - S;
    auto it = T.upper_bound(lb);
    if (it != T.end()) {
      long long l = it->second;
      res += bit.query(l, M);
    }
    assert(T.count(sum));
    bit.add(T[sum], 1);
  }
  return res;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cin >> N >> S;
  for (int i = 0; i < (N); ++i) cin >> A[i];
  cout << solve() << endl;
  return 0;
}
