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 
/**
 * Created by Baelish on 9/17/2018.
 */

import java.io.*;
import java.util.*;
import static java.lang.Math.*;

public class D {
    public static void main(String[] args)throws Exception {
        FastReader in = new FastReader(System.in);
        PrintWriter pw = new PrintWriter(System.out);
        int n = in.nextInt();
        long k = in.nextLong();
        long sum[] = new long[n+1];
        for (int i = 1; i <= n; i++) {
            int x = in.nextInt();
            sum[i] = sum[i-1] + x;
        }

        long ans = 0;
        Treap treap = new Treap();
        for(int i = n; i >= 1; i--){
            treap.add(sum[i]);
            ans += treap.orderOf(sum[i-1] + k);
        }

        pw.println(ans);
        
        pw.close();
    }

    static class Treap { //updated and optimized
        static class Node {
            long key;
            double priority;
            Node left, right;
            int size;

            Node(long key) {
                this.key = key;
                priority = Math.random();
                size = 1;
            }

            void update() {
                size = 1 + getSize(left) + getSize(right);
            }

            int getSize(Node root) {
                return root == null ? 0 : root.size;
            }
        }


        Node root;

        void add(long k) {
            root = add(root, k);
        }

        void remove(int k) {
            root = remove(root, k);
        }

        long get(int k) {
            return get(root, k);
        }

        int getSize(Node root) {
            return root == null ? 0 : root.size;
        }

        int size() {
            return getSize(root);
        }

        int orderOf(long k) { // number of elements < k
            return orderOf(root, k);
        }

        int orderOf(Node temp, long k) { // number of elements < k
            int x = 0;
            if (temp == null) return 0;
            if (temp.key < k) return getSize(temp.left) + 1 + orderOf(temp.right, k);
            else return orderOf(temp.left, k);
        }

        Node splitL, splitR;

        void splitRecursive(Node t, long x) {
            if (t == null) {
                splitL = null;
                splitR = null;
                return;
            }

            if (t.key <= x) {
                splitRecursive(t.right, x);
                t.right = splitL;
                splitL = t;
            } else {
                splitRecursive(t.left, x);
                t.left = splitR;
                splitR = t;
            }
            t.update();
        }


        Node merge(Node left, Node right) {
            if (left == null)
                return right;
            if (right == null)
                return left;
            if (left.priority > right.priority) {
                left.right = merge(left.right, right);
                left.update();
                return left;
            } else {
                right.left = merge(left, right.left);
                right.update();
                return right;
            }
        }

        Node add(Node root, long x) {
            // TreapPair t = split(root, x);
            splitRecursive(root, x);
            return merge(merge(splitL, new Node(x)), splitR);
        }

        Node remove(Node root, int x) {
            if (root == null) {
                return null;
            }
            if (x < root.key) {
                root.left = remove(root.left, x);
                root.update();
                return root;
            } else if (x > root.key) {
                root.right = remove(root.right, x);
                root.update();
                return root;
            } else {
                return merge(root.left, root.right);
            }
        }

        long get(Node n, long k) {
            if (n == null) return -1;
            int key = getSize(n.left) + 1;
            if (key > k) return get(n.left, k);
            else if (key < k) return get(n.right, k - key);
            return n.key;
        }

        void print(Node root) {
            if (root == null)
                return;
            print(root.left);
            System.out.println(root.key);
            print(root.right);
        }
    }

    static void debug(Object...obj) {
        System.err.println(Arrays.deepToString(obj));
    }

    static class FastReader {
        InputStream is;
        private byte[] inbuf = new byte[1024];
        private int lenbuf = 0, ptrbuf = 0;

        public FastReader(InputStream is) {
            this.is = is;
        }

        public FastReader(InputStream is, int charArrayLength) {
            this.is = is;
            buff = new char[charArrayLength];
        }

        public int readByte() {
            if (lenbuf == -1) throw new InputMismatchException();
            if (ptrbuf >= lenbuf) {
                ptrbuf = 0;
                try {
                    lenbuf = is.read(inbuf);
                } catch (IOException e) {
                    throw new InputMismatchException();
                }
                if (lenbuf <= 0) return -1;
            }
            return inbuf[ptrbuf++];
        }

        public boolean isSpaceChar(int c) {
            return !(c >= 33 && c <= 126);
        }
        private boolean isEndOfLine(int c) {
            return c == '\n' || c == '\r' || c == -1;
        }

        public int skip() {
            int b;
            while ((b = readByte()) != -1 && isSpaceChar(b)) ;
            return b;
        }

        public String next() {
            int b = skip();
            StringBuilder sb = new StringBuilder();
            while (!(isSpaceChar(b))) {
                sb.appendCodePoint(b);
                b = readByte();
            }
            return sb.toString();
        }



        public String nextLine() {
            int c = skip();
            StringBuilder sb = new StringBuilder();
            while (!isEndOfLine(c)){
                sb.appendCodePoint(c);
                c = readByte();
            }
            return sb.toString();
        }

        public int nextInt() {
            int num = 0, b;
            boolean minus = false;
            while ((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-')) ;
            if (b == '-') {
                minus = true;
                b = readByte();
            }
            while (true) {
                if (b >= '0' && b <= '9') {
                    num = (num << 3) + (num << 1) + (b - '0');
                } else {
                    return minus ? -num : num;
                }
                b = readByte();
            }
        }

        public long nextLong() {
            long num = 0;
            int b;
            boolean minus = false;
            while ((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-')) ;
            if (b == '-') {
                minus = true;
                b = readByte();
            }

            while (true) {
                if (b >= '0' && b <= '9') {
                    num = (num << 3) + (num << 1) + (b - '0');
                } else {
                    return minus ? -num : num;
                }
                b = readByte();
            }
        }

        public double nextDouble() {
            return Double.parseDouble(next());
        }

        public char[] next(int n) {
            char[] buf = new char[n];
            int b = skip(), p = 0;
            while (p < n && !(isSpaceChar(b))) {
                buf[p++] = (char) b;
                b = readByte();
            }
            return n == p ? buf : Arrays.copyOf(buf, p);
        }

        public char readChar() {
            return (char) skip();
        }

        private char buff[];
        public char[] readCharArray() {
            int b = skip(), p = 0;
            while (!(isSpaceChar(b))) {
                buff[p++] = (char) b;
                b = readByte();
            }
            return Arrays.copyOf(buff, p);
        }
    }
}