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 
//stan hu tao
import static java.lang.Math.max;
import static java.lang.Math.min;
import static java.lang.Math.abs;
import java.util.*;
import java.io.*;
import java.math.*;

public class x1042D
{
    static final int MAX = 200069;
    public static void main(String hi[]) throws Exception
    {
        FastScanner infile = new FastScanner();
        int N = infile.nextInt();
        long T = infile.nextLong()-1;
        int[] arr = infile.nextInts(N);
        ArrayList<Long> prefixes = new ArrayList<Long>();
        long curr = 0L;
        for(int i=0; i < N; i++)
        {
            curr += arr[i];
            prefixes.add(curr);
        }
        Collections.sort(prefixes);
        TreeMap<Long, Integer> map = new TreeMap<Long, Integer>();
        long[] value = new long[MAX];
        int boof = 1;
        for(long x: prefixes)
            if(!map.containsKey(x))
            {
                value[boof] = x;
                map.put(x, boof++);
            }
        FenwickTree bit = new FenwickTree(MAX);
        for(long x: prefixes)
            bit.add(map.get(x), 1);
        curr = 0L;
        long res = 0L;
        for(int i=0; i < N; i++)
        {
            long target = T+curr;
            if(map.firstKey() <= target)
            {
                long key = map.floorKey(target);
                res += bit.find(1, map.get(key));
            }
            curr += arr[i];
            bit.add(map.get(curr), -1);
            if(bit.find(map.get(curr), map.get(curr)) == 0)
                map.remove(curr);
            //System.out.println(res);
        }
        System.out.println(res);
    }
}
class FastScanner
{
    private int BS = 1 << 16;
    private char NC = (char) 0;
    private byte[] buf = new byte[BS];
    private int bId = 0, size = 0;
    private char c = NC;
    private double cnt = 1;
    private BufferedInputStream in;

    public FastScanner() {
        in = new BufferedInputStream(System.in, BS);
    }

    public FastScanner(String s) {
        try {
            in = new BufferedInputStream(new FileInputStream(new File(s)), BS);
        } catch (Exception e) {
            in = new BufferedInputStream(System.in, BS);
        }
    }

    private char getChar() {
        while (bId == size) {
            try {
                size = in.read(buf);
            } catch (Exception e) {
                return NC;
            }
            if (size == -1) return NC;
            bId = 0;
        }
        return (char) buf[bId++];
    }

    public int nextInt() {
        return (int) nextLong();
    }

    public int[] nextInts(int N) {
        int[] res = new int[N];
        for (int i = 0; i < N; i++) {
            res[i] = (int) nextLong();
        }
        return res;
    }

    public long[] nextLongs(int N) {
        long[] res = new long[N];
        for (int i = 0; i < N; i++) {
            res[i] = nextLong();
        }
        return res;
    }

    public long nextLong() {
        cnt = 1;
        boolean neg = false;
        if (c == NC) c = getChar();
        for (; (c < '0' || c > '9'); c = getChar()) {
            if (c == '-') neg = true;
        }
        long res = 0;
        for (; c >= '0' && c <= '9'; c = getChar()) {
            res = (res << 3) + (res << 1) + c - '0';
            cnt *= 10;
        }
        return neg ? -res : res;
    }

    public double nextDouble() {
        double cur = nextLong();
        return c != '.' ? cur : cur + nextLong() / cnt;
    }

    public double[] nextDoubles(int N) {
        double[] res = new double[N];
        for (int i = 0; i < N; i++) {
            res[i] = nextDouble();
        }
        return res;
    }

    public String next() {
        StringBuilder res = new StringBuilder();
        while (c <= 32) c = getChar();
        while (c > 32) {
            res.append(c);
            c = getChar();
        }
        return res.toString();
    }

    public String nextLine() {
        StringBuilder res = new StringBuilder();
        while (c <= 32) c = getChar();
        while (c != '\n') {
            res.append(c);
            c = getChar();
        }
        return res.toString();
    }

    public boolean hasNext() {
        if (c > 32) return true;
        while (true) {
            c = getChar();
            if (c == NC) return false;
            else if (c > 32) return true;
        }
    }
}
class FenwickTree
{
    //1 indexed
    public int[] tree;
    public int size;

    public FenwickTree(int size)
    {
        this.size = size;
        tree = new int[size+5];
    }
    public void add(int i, int v)
    {
        while(i <= size)
        {
            tree[i] += v;
            i += i&-i;
        }
    }
    public int find(int i)
    {
        int res = 0;
        while(i >= 1)
        {
            res += tree[i];
            i -= i&-i;
        }
        return res;
    }
    public int find(int l, int r)
    {
        return find(r)-find(l-1);
    }
}