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;
bool Finish_read;
template <class T>
inline void read(T &x) {
  Finish_read = 0;
  x = 0;
  int f = 1;
  char ch = getchar();
  while (!isdigit(ch)) {
    if (ch == '-') f = -1;
    if (ch == EOF) return;
    ch = getchar();
  }
  while (isdigit(ch)) x = x * 10 + ch - '0', ch = getchar();
  x *= f;
  Finish_read = 1;
}
template <class T>
inline void print(T x) {
  if (x / 10 != 0) print(x / 10);
  putchar(x % 10 + '0');
}
template <class T>
inline void writeln(T x) {
  if (x < 0) putchar('-');
  x = abs(x);
  print(x);
  putchar('\n');
}
template <class T>
inline void write(T x) {
  if (x < 0) putchar('-');
  x = abs(x);
  print(x);
}
const int maxn = 3e5 + 500;
int n;
long long T;
long long a[maxn];
namespace Treap {
struct node {
  int ls, rs, sz;
  long long v;
  long long Rnd;
  bool rev;
  node(long long _v = 0, int _sz = 0) : v(_v), sz(_sz) {
    ls = rs = 0;
    Rnd = rand();
    rev = 0;
  }
} t[maxn];
int tot = 0, rt = 0;
void Pushdown(int o) {
  if (!o) return;
  if (t[o].rev) {
    if (t[o].ls) swap(t[t[o].ls].ls, t[t[o].rs].rs), t[t[o].ls].rev ^= 1;
    if (t[o].rs) swap(t[t[o].ls].ls, t[t[o].rs].rs), t[t[o].rs].rev ^= 1;
    t[o].rev ^= 1;
  }
}
void Update(int o) { t[o].sz = t[t[o].ls].sz + t[t[o].rs].sz + 1; }
int Newnode(long long v) {
  t[++tot] = node(v, 1);
  return tot;
}
int Merge(int a, int b) {
  if (!a || !b) return a | b;
  Pushdown(a);
  Pushdown(b);
  if (t[a].Rnd < t[b].Rnd) {
    t[a].rs = Merge(t[a].rs, b);
    Update(a);
    return a;
  } else {
    t[b].ls = Merge(a, t[b].ls);
    Update(b);
    return b;
  }
}
pair<int, int> Split(int o, int k) {
  if (!o) return pair<int, int>(0, 0);
  Pushdown(o);
  if (t[t[o].ls].sz == k) {
    int pre = t[o].ls;
    t[o].ls = 0;
    Update(o);
    return pair<int, int>(pre, o);
  }
  if (t[t[o].ls].sz + 1 == k) {
    int pre = t[o].rs;
    t[o].rs = 0;
    Update(o);
    return pair<int, int>(o, pre);
  }
  if (t[t[o].ls].sz > k) {
    pair<int, int> tmp = Split(t[o].ls, k);
    t[o].ls = tmp.second;
    Update(o);
    return pair<int, int>(tmp.first, o);
  }
  pair<int, int> tmp = Split(t[o].rs, k - t[t[o].ls].sz - 1);
  t[o].rs = tmp.first;
  Update(o);
  return pair<int, int>(o, tmp.second);
}
int GetRank(int o, long long val) {
  int res = 0, rnk = 1e9;
  while (o) {
    if (t[o].v == val) rnk = min(rnk, res + t[t[o].ls].sz + 1);
    if (t[o].v < val)
      res += t[t[o].ls].sz + 1, o = t[o].rs;
    else
      o = t[o].ls;
  }
  return rnk == 1e9 ? res : rnk;
}
int GetNum(int o, long long k) {
  while (1) {
    if (t[t[o].ls].sz + 1 == k)
      return t[o].v;
    else if (t[t[o].ls].sz + 1 < k)
      k -= (t[t[o].ls].sz + 1), o = t[o].rs;
    else
      o = t[o].ls;
  }
}
int Getcnt(int o, long long val) {
  int res = 0;
  while (o) {
    if (t[o].v > val)
      res += t[t[o].rs].sz + 1, o = t[o].ls;
    else
      o = t[o].rs;
  }
  return res;
}
void Insert(int o, long long x) {
  int Rnk = GetRank(o, x);
  pair<int, int> tmp = Split(o, Rnk);
  int node = Newnode(x);
  rt = Merge(tmp.first, node);
  rt = Merge(rt, tmp.second);
  return;
}
void Delete(int o, int x) {
  int Rnk = GetRank(o, x);
  pair<int, int> tmp1 = Split(o, Rnk);
  pair<int, int> tmp2 = Split(tmp1.first, Rnk - 1);
  rt = Merge(tmp2.first, tmp1.second);
  return;
}
}  // namespace Treap
using namespace Treap;
int main() {
  read(n);
  read(T);
  for (int i = 1; i <= n; i++) {
    read(a[i]);
  }
  long long sum = 0;
  long long res = 0;
  Insert(rt, 0);
  for (int i = 1; i <= n; i++) {
    sum += a[i];
    long long tar = sum - T;
    res += 1ll * Getcnt(rt, tar);
    Insert(rt, sum);
  }
  printf("%lld\n", res);
  return 0;
}
