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;
struct splay_node {
  splay_node *parent, *child[2];
  long long value;
  int size;
  splay_node() : parent(nullptr), child{nullptr, nullptr}, size(1) {}
  static int get_size(splay_node *x) { return x == nullptr ? 0 : x->size; }
  int parent_index() const { return this == parent->child[0] ? 0 : 1; }
  void set_child(int index, splay_node *x) {
    child[index] = x;
    if (x != nullptr) x->parent = this;
  }
  void join() { size = get_size(child[0]) + get_size(child[1]) + 1; }
};
struct splay_tree {
  splay_node *root;
  int tree_size;
  splay_tree() : root(nullptr), tree_size(0) {}
  void rotate_up(splay_node *x) {
    splay_node *p = x->parent, *gp = p->parent;
    int index = x->parent_index();
    if (gp == nullptr) {
      x->parent = nullptr;
      root = x;
    } else {
      gp->set_child(p->parent_index(), x);
    }
    p->set_child(index, x->child[!index]);
    x->set_child(!index, p);
    p->join();
  }
  void splay(splay_node *x) {
    while (x != root) {
      splay_node *p = x->parent;
      if (p != root) rotate_up(x->parent_index() == p->parent_index() ? p : x);
      rotate_up(x);
    }
    x->join();
  }
  splay_node *insert(const long long &value) {
    splay_node *x = new splay_node;
    x->value = value;
    tree_size++;
    if (root == nullptr) return root = x;
    splay_node *current = root, *prev = nullptr;
    while (current != nullptr) {
      prev = current;
      current->size++;
      current = current->child[value < current->value ? 0 : 1];
    }
    prev->set_child(value < prev->value ? 0 : 1, x);
    splay(x);
    return x;
  }
  splay_node *root_successor() {
    splay_node *x = root->child[1];
    while (x->child[0] != nullptr) x = x->child[0];
    return x;
  }
  void erase(splay_node *x) {
    splay(x);
    if (x->child[0] == nullptr) {
      root = x->child[1];
    } else if (x->child[1] == nullptr) {
      root = x->child[0];
    } else {
      splay(root_successor());
      assert(root->child[0] == x && x->child[1] == nullptr);
      root->set_child(0, x->child[0]);
      root->size--;
    }
    if (root != nullptr) root->parent = nullptr;
    delete x;
    tree_size--;
  }
  splay_node *lower_bound(const long long &value) {
    splay_node *current = root, *prev = nullptr, *answer = nullptr;
    while (current != nullptr) {
      prev = current;
      if (current->value < value) {
        current = current->child[1];
      } else {
        answer = current;
        current = current->child[0];
      }
    }
    if (prev != nullptr) splay(prev);
    return answer;
  }
  bool erase(const long long &value) {
    splay_node *x = lower_bound(value);
    if (x == nullptr || x->value != value) return false;
    erase(x);
    return true;
  }
  int less_than(const long long &value) {
    splay_node *x = lower_bound(value);
    if (x == nullptr) return tree_size;
    splay(x);
    return x->child[0] == nullptr ? 0 : x->child[0]->size;
  }
  int less_equal(const long long &value) {
    assert(is_integral<long long>::value);
    return less_than(value + 1);
  }
  splay_node *node_at_index(int index) {
    splay_node *current = root;
    while (current != nullptr) {
      int left_size = splay_node::get_size(current->child[0]);
      if (index == left_size) return current;
      if (index < left_size) {
        current = current->child[0];
      } else {
        current = current->child[1];
        index -= left_size + 1;
      }
    }
    return nullptr;
  }
};
int main() {
  int N;
  long long T;
  scanf("%d %lld", &N, &T);
  splay_tree tree;
  long long sum = 0, total = 0;
  tree.insert(0);
  for (int i = 1; i <= N; i++) {
    int a;
    scanf("%d", &a);
    sum += a;
    total += i - tree.less_equal(sum - T);
    tree.insert(sum);
  }
  printf("%lld\n", total);
}
