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 
/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

import java.io.*;
import java.util.*;
public class D1042 {
    static int tree[];
    public static void main(String args[])throws IOException
    {
        Reader sc=new Reader();
        int n=sc.nextInt();
        long limit=sc.nextLong();
        int a[]=new int[n+1];
        
        for(int i=1;i<=n;i++)
        {
            a[i]=sc.nextInt();
        }
        TreeSet<Long> set=new TreeSet<>();
        HashMap<Long,Integer> map=new HashMap<>();
        long sum=0;
        for(int i=0;i<=n;i++)
        {
            sum+=a[i];
            set.add(sum);
        }
        int c=1;
        for(long x:set)
        {
            map.put(x,c);
            c++;
        }
        int size=c-1;
        set=new TreeSet<>();sum=0;
        tree=new int[size<<2];
        update(1,size,1,map.get(0L));
        long res=0;set.add(0L);
        for(int i=1;i<=n;i++)
        {
            sum+=a[i];
            long req=sum-limit;
            if(set.higher(req)!=null)
            {
                long xx=set.higher(req);
                int pos=map.get(xx);
                res+=query(1,size,1,pos,size);
            }
            set.add(sum);
            update(1,size,1,map.get(sum));
        }
        System.out.println(res);
    }
    static int query(int st,int end,int node,int l,int r)
    {
        if(st>end || r<st || l>end)
            return 0;
        if(st>=l && end<=r)
            return tree[node];
        int mid=(st+end)/2;
        return query(st,mid,node*2,l,r)+query(mid+1,end,node*2 +1,l,r);
    }
    static void update(int st,int end,int node,int ind)
    {
        if(st==end)
        {
            tree[node]++;
            return;
        }
        int mid=(st+end)/2;
        if(ind>=st && ind<=mid)
            update(st,mid,node*2,ind);
        else
            update(mid+1,end,node*2 +1,ind);
        
        tree[node]=tree[node*2]+tree[node*2 +1];
    }

}

class Reader {
		final private int BUFFER_SIZE = 1 << 16;
		private DataInputStream din;
		private byte [] buffer;
		private int bufferPointer, bytesRead;
		
		public Reader () {
			din = new DataInputStream (System.in);
			buffer = new byte[BUFFER_SIZE];
			bufferPointer = bytesRead = 0;
		}
		
		public Reader (String file_name) throws IOException {
			din = new DataInputStream (new FileInputStream (file_name));
			buffer = new byte[BUFFER_SIZE];
			bufferPointer = bytesRead = 0;
		}
		
		public String readLine () throws IOException {
			byte [] buf = new byte[1024];
			int cnt = 0, c;
			while ((c = read ()) != -1) {
				if (c == '\n')
					break;
				buf[cnt++] = (byte) c;
			}
			return new String (buf, 0, cnt);
		}
		
		public int nextInt () throws IOException {
			int ret = 0;
			byte c = read ();
			while (c <= ' ')
				c = read ();
			boolean neg = (c == '-');
			if (neg)
				c = read ();
			do {
				ret = ret * 10 + c - '0';
			} while ((c = read ()) >= '0' && c <= '9');
			if (neg)
				return -ret;
			return ret;
		}
		
		public long nextLong () throws IOException {
			long ret = 0;
			byte c = read ();
			while (c <= ' ')
				c = read ();
			boolean neg = (c == '-');
			if (neg)
				c = read ();
			do {
				ret = ret * 10 + c - '0';
			} while ((c = read ()) >= '0' && c <= '9');
			if (neg)
				return -ret;
			return ret;
		}
		
		public double nextDouble () throws IOException {
			double ret = 0, div = 1;
			byte c = read ();
			while (c <= ' ')
				c = read ();
			boolean neg = (c == '-');
			if (neg)
				c = read ();
			do {
				ret = ret * 10 + c - '0';
			} while ((c = read ()) >= '0' && c <= '9');
			if (c == '.')
				while ((c = read ()) >= '0' && c <= '9')
					ret += (c - '0') / (div *= 10);
			if (neg)
				return -ret;
			return ret;
		}
		
		private void fillBuffer () throws IOException {
			bytesRead = din.read (buffer, bufferPointer = 0, BUFFER_SIZE);
			if (bytesRead == -1)
				buffer[0] = -1;
		}
		
		private byte read () throws IOException {
			if (bufferPointer == bytesRead)
				fillBuffer ();
			return buffer[bufferPointer++];
		}
		
		public void close () throws IOException {
			if (din == null)
				return;
			din.close ();
		}
	}
