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 
//package que_a;

import java.io.*;
import java.util.*;
import java.math.*;

public class utkarsh {

    InputStream is;
    PrintWriter out;
    
    long mod = (long) (1e9 + 7), inf = (long) (3e15);
    boolean SHOW_TIME, debug;
    
    class pair {
        long V; int I;
        pair(long f, int s) {
            V = f;   I = s;
        }
    }
    
    int tree[];
    
    void update(int n, int s, int e, int x) {
        if(s == e) {
            if(s == x)  tree[n]++;
        } else if(s <= x && x <= e) {
            tree[n]++;
            int m = (s + e) >> 1;
            update(n+1+n, s, m, x);
            update(n+2+n, m+1, e, x);
        }
    }
    
    int query(int n, int s, int e, int l, int r) {
        if(e < l || r < s)  return 0;
        if(l <= s && e <= r) {
            return tree[n];
        } else {
            int m = (s + e) >> 1;
            return query(n+1+n, s, m, l, r) + query(n+2+n, m+1, e, l, r);
        }
    }
    
    void solve() {
        //Enter code here utkarsh
        //SHOW_TIME = true;
        //debug = true;
        int n = ni();
        tree = new int[n << 2];
        long t = nl();
        long a[] = new long[n];
        for(int i = 0; i < n; i++)  a[i] = nl();
        pair d[] = new pair[n];
        d[0] = new pair(a[0], 0);
        for(int i = 1; i < n; i++)  d[i] = new pair(a[i] + d[i-1].V, i);
        Arrays.sort(d, (pair u, pair v) -> ((u.V < v.V) ? -1 : 1));
        HashMap <Integer, Integer> mp = new HashMap<>();
        for(int i = 0; i < n; i++) {
            mp.put(d[i].I, i);
            d[i].I = i;
        }
        long ans = 0;
        for(int i = 0; i < n; i++) {
            int j = bs(d, t);
            if(j >= 0) {
                ans += j + 1 - query(0, 0, n-1, 0, j);
            }
            update(0, 0, n-1, mp.get(i));
            t += a[i];
        }
        out.println(ans);
    }
    
    int bs(pair[] d, long t) {
        int l = 0, r = d.length-1;
        while(l <= r) {
            int m = (l + r) >> 1;
            if(d[m].V < t)  l = m+1;
            else    r = m-1;
        }
        return l-1;
    }

    //---------- I/O Template ----------
    
    public static void main(String[] args) { new utkarsh().run(); }
    void run() { 
        is = System.in; 
        out = new PrintWriter(System.out);
        long start = System.currentTimeMillis(); 
        solve(); 
        long end = System.currentTimeMillis();
        if(SHOW_TIME) out.println("\n" + (end - start) + " ms");
        out.flush();
    }
    
    byte input[] = new byte[1024];
    int len = 0, ptr = 0;
    
    int readByte() { 
        if(ptr >= len) { ptr = 0; 
            try { len = is.read(input); } 
            catch(IOException e) { throw new InputMismatchException(); } 
            if(len <= 0) { return -1; } 
        } return input[ptr++];
    }
    boolean isSpaceChar(int c) { return !( c >= 33 && c <= 126 ); }
    int skip() { 
        int b = readByte(); 
        while(b != -1 && isSpaceChar(b)) { b = readByte(); } 
        return b;
    }
    
    char nc() { return (char)skip(); }
    String ns() { 
        int b = skip(); 
        StringBuilder sb = new StringBuilder(); 
        while(!isSpaceChar(b)) { sb.appendCodePoint(b); b = readByte(); } 
        return sb.toString();
    }
    String nLine() { 
        int b = skip(); 
        StringBuilder sb = new StringBuilder(); 
        while( !(isSpaceChar(b) && b != ' ') ) { sb.appendCodePoint(b); b = readByte(); } 
        return sb.toString();
    }
    int ni() { 
        int n = 0, b = readByte(); 
        boolean minus = false; 
        while(b != -1 && !( (b >= '0' && b <= '9') || b == '-')) { b = readByte(); } 
        if(b == '-') { minus = true; b = readByte(); } 
        if(b == -1) { return -1; }  //no input 
        while(b >= '0' && b <= '9') { n = n * 10 + (b - '0'); b = readByte(); } 
        return minus ? -n : n;
    }
    long nl() { 
        long n = 0L;    int b = readByte(); 
        boolean minus = false; 
        while(b != -1 && !( (b >= '0' && b <= '9') || b == '-')) { b = readByte(); } 
        if(b == '-') { minus = true; b = readByte(); } 
        while(b >= '0' && b <= '9') { n = n * 10 + (b - '0'); b = readByte(); } 
        return minus ? -n : n;
    }

    double nd() { return Double.parseDouble(ns()); }
    float nf() { return Float.parseFloat(ns()); }
    int[] na(int n) { 
        int a[] = new int[n]; 
        for(int i = 0; i < n; i++) { a[i] = ni(); } 
        return a;
    }
    char[] ns(int n) { 
        char c[] = new char[n]; 
        int i, b = skip(); 
        for(i = 0; i < n; i++) { 
            if(isSpaceChar(b)) { break; } 
            c[i] = (char)b; b = readByte(); 
        } return i == n ? c : Arrays.copyOf(c,i);
    }
}