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 
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.StreamTokenizer;

public class Main {

    static class Node {

        public int height;
        public long value;
        public Node parent;
        public Node leftSon;
        public Node rightSon;
        public int valueCount;
        public int count;

        public Node(long v) {
            value = v;
            height = 1;
            parent = null;
            leftSon = null;
            rightSon = null;
            count = 1;
            valueCount = 1;
        }

        public void calculateCount() {
            int count = 0;
            if (null != leftSon)
                count += leftSon.count;
            if (null != rightSon)
                count += rightSon.count;
            this.count = count + valueCount;
        }

        public void calculatorHeight() {
            int leftHeight = 0;
            int rightHeight = 0;
            if (null != leftSon)
                leftHeight = leftSon.height;
            if (null != rightSon)
                rightHeight = rightSon.height;
            this.height = Math.max(leftHeight, rightHeight) + 1;
        }
    }

    static Node root;

    public static void main(String[] args) throws IOException {

        StreamTokenizer streamTokenizer = new StreamTokenizer(new BufferedReader(new InputStreamReader(System.in)));

        streamTokenizer.nextToken();
        int n = (int) streamTokenizer.nval;
        streamTokenizer.nextToken();
        long t = (long) streamTokenizer.nval;

        long x;
        long count = 0;
        root = new Node(0);
        Node temp;
        long ans = 0;
        for (int i = 0; i < n; i++) {
            streamTokenizer.nextToken();
            x = (long) streamTokenizer.nval;
            count += x;
            temp = new Node(count);
            ans += find(count - t);
            addNode(root, temp);
        }

        System.out.println(ans);
    }

    public static void addNode(Node cur, Node node) {
        if (cur.value < node.value) {
            if (null == cur.rightSon) {
                node.parent = cur;
                cur.rightSon = node;
            } else
                addNode(cur.rightSon, node);
        }
        else if (cur.value > node.value) {
            if (null == cur.leftSon) {
                node.parent = cur;
                cur.leftSon = node;
            }
            else
                addNode(cur.leftSon, node);
        } else {
            cur.valueCount++;
            cur.count++;
        }
        int leftHeight = 0;
        int rightHeight = 0;
        int leftHeight2 = 0;
        int rightHeight2 = 0;
        if (null != cur.leftSon)
            leftHeight = cur.leftSon.height;
        if (null != cur.rightSon)
            rightHeight = cur.rightSon.height;
        if (leftHeight > rightHeight + 1) { //左边高
            if (null != cur.leftSon.leftSon)
                leftHeight2 = cur.leftSon.leftSon.height;
            if (null != cur.leftSon.rightSon)
                rightHeight2 = cur.leftSon.rightSon.height;
            if (leftHeight2 > rightHeight2) //左左
                rightTranslate(cur);
            else { //左右
                leftTranslate(cur.leftSon);
                rightTranslate(cur);
            }
        }
        else if (rightHeight > leftHeight + 1) {//右边高
            if (null != cur.rightSon.leftSon)
                leftHeight2 = cur.rightSon.leftSon.height;
            if (null != cur.rightSon.rightSon)
                rightHeight2 = cur.rightSon.rightSon.height;
            if (leftHeight2 > rightHeight2) { //右左
                rightTranslate(cur.rightSon);
                leftTranslate(cur);
            }
            else //右右
                leftTranslate(cur);
        }
        else {
            cur.height = Math.max(leftHeight, rightHeight) + 1;
            cur.calculateCount();
        }
    }

    public static void leftTranslate(Node node) {
        Node rightSon = node.rightSon;
        node.rightSon = rightSon.leftSon;
        if (null != node.rightSon)
            node.rightSon.parent = node;
        rightSon.leftSon = node;
        if (null == node.parent)
            root = rightSon;
        else if (node.parent.leftSon == node)
            node.parent.leftSon = rightSon;
        else
            node.parent.rightSon = rightSon;
        rightSon.parent = node.parent;
        node.parent = rightSon;
        node.calculateCount();
        rightSon.calculateCount();
        node.calculatorHeight();
        rightSon.calculatorHeight();
    }

    public static void rightTranslate(Node node) {
        Node leftSon = node.leftSon;
        node.leftSon = leftSon.rightSon;
        if (null != node.leftSon)
            node.leftSon.parent = node;
        leftSon.rightSon = node;
        if (null == node.parent)
            root = leftSon;
        else if (node.parent.leftSon == node)
            node.parent.leftSon = leftSon;
        else
            node.parent.rightSon = leftSon;
        leftSon.parent = node.parent;
        node.parent = leftSon;
        node.calculateCount();
        leftSon.calculateCount();
        node.calculatorHeight();
        leftSon.calculatorHeight();
    }

    public static int find(long v) {
        Node node = root;
        int result = 0;
        while (null != node) {
            if (node.value > v) {
                if (null != node.rightSon)
                    result += node.rightSon.count;
                result += node.valueCount;
                node = node.leftSon;
            } else
                node = node.rightSon;
        }
        return result;
    }
}
