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.*;
import java.util.*;
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);
        TaskE solver = new TaskE();
        solver.solve(1, in, out);
        out.flush();out.close();
    }
        static class TaskE {
        class pair{
            long F,S;
            pair(long a,long b){F=a;S=b;}
        }
        long b[];
        long seg[][];
        void make(int n,int s,int e){
            if(s==e){
                seg[n]=new long[1];
                seg[n][0]=b[s+1];
                return;
            }
            int m=(s+e)>>1;
            make(2*n+1,s,m);make(2*n+2,m+1,e);
            seg[n]=new long[e-s+1];
            merge(n);
        }
        void merge(int n){
            int n1=2*n+1,n2=2*n+2;
            int sz1=seg[n1].length,sz2=seg[n2].length;
            int p1=0,p2=0,p=0;
            while(p1<sz1&&p2<sz2){
                if(seg[n1][p1]<seg[n2][p2]){
                    seg[n][p++]=seg[n1][p1];
                    p1++;
                }else if(seg[n1][p1]>seg[n2][p2]){
                    seg[n][p++]=seg[n2][p2];
                    p2++;
                }else{
                    seg[n][p++]=seg[n1][p1];
                    seg[n][p++]=seg[n2][p2];
                    p1++;p2++;
                }
            }
            while(p1<sz1){
                seg[n][p++]=seg[n1][p1];
                p1++;
            }
            while(p2<sz2){
                seg[n][p++]=seg[n2][p2];
                p2++;
            }
        }
        int query(int n,int s,int e,int qs,int qe,long val){
            if(qs>e||qe<s)return 0;
            if(s>=qs&&e<=qe){
                return bs(n,val);
            }
            int m=(s+e)>>1;
            return query(2*n+1,s,m,qs,qe,val)+query(2*n+2,m+1,e,qs,qe,val);
        }
        int bs(int n,long val){
            int l=0,r=seg[n].length-1;
            int ans=-1;
            while(l<=r){
                int m=(l+r)>>1;
                if(seg[n][m]>val){
                    r=m-1;
                }else{
                    ans=m;
                    l=m+1;
                }
            }
            return ans+1;
        }
	 	  public void solve(int testNumber, InputReader in, PrintWriter out) {
 		     int n=in.nextInt();long t=in.nextLong();
             long a[]=new long[n+2];
             seg=new long[4*n][];
             b=new long[n+2];
             for(int i=1;i<=n;i++){
                a[i]=in.nextLong();
             }
             for(int i=1;i<=n;i++){
                b[i]=b[i-1]+a[i];
             }
             make(0,0,n-1);
             int j=0;
             long sum=0;
             long ans=0;
             for(int i=1;i<=n;i++){
                // j=Math.max(j,i);
                // while(j<=n){
                //     if(sum+a[j]<t){
                //         sum+=a[j];++j;
                //     }else{
                //         break;
                //     }
                // }
                // // out.println(i+" "+j);
                // long left=t-sum-1+b[j-1];
                // long cnt=query(0,0,n-1,j-1,n-1,left);
                // ans+=j-i+cnt;
                // if(j>i){
                //     sum-=a[i];
                // }
                long left=t-1+b[i-1];
                ans+=query(0,0,n-1,i-1,n-1,left);
             }
             out.print(ans);
          }
//         pair ja[][];long w[];int from[],to[],c[];
//             void make(int n,int m,InputReader in){
//              ja=new pair[n+1][];w=new long[m];from=new int[m];to=new int[m];c=new int[n+1];
//              for(int i=0;i<m;i++){
//               int u=in.nextInt(),v=in.nextInt();long wt=in.nextLong();
//               c[u]++;c[v]++;from[i]=u;to[i]=v;w[i]=wt;
//              }
//              for(int i=1;i<=n;i++){
//               ja[i]=new pair[c[i]];c[i]=0;
//              }
//              for(int i=0;i<m;i++){
//               ja[from[i]][c[from[i]]++]=new pair(to[i],w[i]);
//               ja[to[i]][c[to[i]]++]=new pair(from[i],w[i]);
//              }
//             }
//        int[] radixSort(int[] f){ return radixSort(f, f.length); }
//	int[] radixSort(int[] f, int n)
//	{
//		int[] to = new int[n];
//		{
//			int[] b = new int[65537];
//			for(int i = 0;i < n;i++)b[1+(f[i]&0xffff)]++;
//			for(int i = 1;i <= 65536;i++)b[i]+=b[i-1];
//			for(int i = 0;i < n;i++)to[b[f[i]&0xffff]++] = f[i];
//			int[] d = f; f = to;to = d;
//		}
//		{
//			int[] b = new int[65537];
//			for(int i = 0;i < n;i++)b[1+(f[i]>>>16)]++;
//			for(int i = 1;i <= 65536;i++)b[i]+=b[i-1];
//			for(int i = 0;i < n;i++)to[b[f[i]>>>16]++] = f[i];
//			int[] d = f; f = to;to = d;
//		}
//		return f;
//	}
    }
    static class InputReader {
        BufferedReader br;
        StringTokenizer st;
        public InputReader(InputStream stream) {
            br = new BufferedReader(new InputStreamReader(stream));
            st = null;
        }

        String next() {
            while (st == null || !st.hasMoreTokens()) {
                String s = null;
                try {
                    s = br.readLine();
                } catch (IOException e) {
                    e.printStackTrace();
                }
                if (s == null)
                    return null;
                st = new StringTokenizer(s);
            }
            return st.nextToken();
        }

        boolean hasMoreTokens() {
            while (st == null || !st.hasMoreTokens()) {
                String s = null;
                try {
                    s = br.readLine();
                } catch (IOException e) {
                    e.printStackTrace();
                }
                if (s == null)
                    return false;
                st = new StringTokenizer(s);
            }
            return true;
        }

        public int nextInt() {
            return Integer.parseInt(next());
        }
        public long nextLong() {
            return Long.parseLong(next());
        }
        public double nextDouble() {
            return Double.parseDouble(next());
        }
    }
}