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.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.HashMap;
import java.util.InputMismatchException;
import java.io.IOException;
import java.util.TreeSet;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author real
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        TaskD solver = new TaskD();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskD {
        public void solve(int testNumber, InputReader in, PrintWriter out) {
            int n = in.nextInt();
            long t = in.nextLong();
            long ar[] = in.nextLongArray(n);
            TreeSet<Long> set = new TreeSet<>();
            set.add((long) 0);
            long sum = 0;
            for (int i = 0; i < n; i++) {
                sum += ar[i];
                set.add(sum);
                set.add(sum - t);
            }
            HashMap<Long, Integer> hm = new HashMap<>();
            int ct = 1;
            while (set.size() != 0) {
                long val = set.pollFirst();
                hm.put(val, ct);
                ct++;
            }
            //   System.out.println(hm);
            BitTree tree = new BitTree();
            tree.initialise(ct);
            sum = 0;
            long ans = 0;
            tree.addZeroBasedIndex(1, hm.get((long) 0));
            long total = 1;
            for (int i = 0; i < n; i++) {
                sum += ar[i];
                long interme = sum - t;
                long smaller = tree.queryZeroBased(hm.get(interme));
                ans += total - smaller;
                tree.addZeroBasedIndex(1, hm.get(sum));
                total++;
            }
            out.print(ans);
        }

    }

    static class InputReader {
        private final InputStream stream;
        private final byte[] buf = new byte[8192];
        private int curChar;
        private int snumChars;

        public InputReader(InputStream st) {
            this.stream = st;
        }

        public int read() {
            //*-*------clare------
//remeber while comparing 2 non primitive data type not to use ==
//remember Arrays.sort for primitive data has worst time case complexity of 0(n^2) bcoz it uses quick sort
//again silly mistakes ,yr kb tk krta rhega ye mistakes
//try to write simple codes ,break it into simple things
            // for test cases make sure println(); ;)
//knowledge>rating
        /*
        public class Main
        implements Runnable{
    public static void main(String[] args) {
        new Thread(null,new Main(),"Main",1<<26).start();

    }
    public void run() {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        TaskC solver = new TaskC();//chenge the name of task
        solver.solve(1, in, out);
        out.close();
    }
         */

            if (snumChars == -1)
                throw new InputMismatchException();
            if (curChar >= snumChars) {
                curChar = 0;
                try {
                    snumChars = stream.read(buf);
                } catch (IOException e) {
                    throw new InputMismatchException();
                }
                if (snumChars <= 0)
                    return -1;
            }
            return buf[curChar++];
        }

        public int nextInt() {
            int c = read();
            while (isSpaceChar(c)) {
                c = read();
            }
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            int res = 0;
            do {
                res *= 10;
                res += c - '0';
                c = read();
            } while (!isSpaceChar(c));
            return res * sgn;
        }

        public long nextLong() {
            int c = read();
            while (isSpaceChar(c)) {
                c = read();
            }
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            long res = 0;
            do {
                res *= 10;
                res += c - '0';
                c = read();
            } while (!isSpaceChar(c));
            return res * sgn;
        }

        public long[] nextLongArray(int n) {
            long a[] = new long[n];
            for (int i = 0; i < n; i++) {
                a[i] = nextLong();
            }
            return a;
        }

        public boolean isSpaceChar(int c) {
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

    }

    static class BitTree {
        int[] tree;

        public void initialise(int n) {
            tree = new int[n + 1];
        }

        public void addZeroBasedIndex(int val, int ind) {
            ind = ind + 1;
            while (ind < tree.length) {
                tree[ind] += val;
                ind = ind + (ind & (-ind));
            }
        }

        public long queryZeroBased(int idx) {
            idx = idx + 1;
            long ans = 0;
            while (idx > 0) {
                ans += tree[idx];
                idx = idx - (idx & (-idx));
            }
            return ans;
        }

    }
}

