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;
const int mod = 1e9 + 7;
template <typename T>
void printVector(const T& a, int type = 0, int left = -1, int right = -1) {
  if (left != -1 && right != -1) {
    for (int i = left; i < right; i++) {
      cout << a[i] << " ";
      if (type == 1) {
        cout << endl;
      }
    }
    if (type == 0) {
      cout << endl;
    }
    return;
  }
  for (auto it : a) {
    cout << it << " ";
    if (type == 1) {
      cout << endl;
    }
  }
  if (type == 0) {
    cout << endl;
  }
}
inline int charToInt(char c, char base = 'a') {
  if (base == '-') {
    return (int)c;
  }
  return (int)(c - base);
}
inline char intToChar(int i, char base = 'a') {
  return (char)(i + charToInt(base, '-'));
}
inline void addMod(long long& a, long long b) {
  a += b;
  a %= mod;
}
inline void subMod(long long& a, long long b) {
  a -= b;
  if (a < 0) {
    a += mod;
  }
}
inline void mulMod(long long& a, long long b) {
  a *= b;
  a %= mod;
}
inline long long powerMod(long long a, long long n) {
  long long ans = 1;
  while (n > 0) {
    if (n & 1) {
      mulMod(ans, a);
    }
    mulMod(a, a);
    n >>= 1;
  }
  return ans;
}
inline long long powerNoMod(long long a, long long n) {
  long long ans = 1;
  while (n > 0) {
    if (n & 1) {
      ans *= a;
    }
    a *= a;
    n >>= 1;
  }
  return ans;
}
inline long long gcd(long long a, long long b) {
  if (b == 0) {
    return a;
  }
  return gcd(b, a % b);
}
inline long long lcm(long long a, long long b) { return (a * b) / gcd(a, b); }
inline bool isEqualDouble(double a, double b, double epsilon = 0.0000001) {
  return fabs(a - b) < epsilon;
}
inline void fact(vector<long long>& f) {
  f[0] = 1LL;
  for (int i = 1; i <= 1e6; i++) {
    mulMod(f[i], (long long)i);
  }
}
inline long long nCk(long long k, long long n) {
  long long ans = 1;
  k = max(k, n - k);
  for (int i = 0; i < k; i++) {
    ans *= (n - i);
    ans /= (i + 1);
  }
  return ans;
}
inline long long nCk(const vector<long long>& f, int k, int n) {
  if (k < 0 || k > n) {
    return 0;
  }
  long long d = (f[k] * f[n - k]) % mod;
  d = powerMod(d, (long long)mod - 2LL);
  return (f[n] * d) % mod;
}
long long ans = 0;
void combine(vector<long long>& a, int left, int mid, int right) {
  vector<long long> tmp;
  int i, j;
  i = left;
  j = mid + 1;
  while (i <= mid || j <= right) {
    if (i <= mid && j <= right) {
      if (a[i] <= a[j]) {
        tmp.push_back(a[i++]);
      } else {
        tmp.push_back(a[j++]);
      }
    } else {
      if (i <= mid) {
        tmp.push_back(a[i++]);
      } else {
        tmp.push_back(a[j++]);
      }
    }
  }
  for (i = left, j = 0; i <= right; i++, j++) {
    a[i] = tmp[j];
  }
}
void solve(vector<long long>& a, long long t, int left, int right) {
  if (left >= right) {
    return;
  }
  int mid = left + (right - left) / 2;
  solve(a, t, left, mid);
  solve(a, t, mid + 1, right);
  vector<long long> tmp;
  for (int i = mid + 1; i <= right; i++) {
    tmp.push_back(a[i] - t);
  }
  for (int i = left; i <= mid; i++) {
    int found = lower_bound(tmp.begin(), tmp.end(), a[i]) - tmp.begin();
    ans += found;
  }
  combine(a, left, mid, right);
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int n;
  long long t;
  cin >> n >> t;
  int i;
  long long inp;
  vector<long long> a;
  a.push_back(0);
  for (i = 0; i < n; i++) {
    cin >> inp;
    a.push_back(inp);
  }
  for (i = 1; i <= n; i++) {
    a[i] += a[i - 1];
  }
  solve(a, t, 0, n);
  cout << ans;
  return 0;
}
