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.util.*;
import java.lang.*;
import java.math.*;
import java.io.*;
import static java.lang.Math.*;



public class Solution{ 
	static long[] tree;
	static long[] arr,pre,post;
	static ArrayList<Long>[] al;
	static long build(int i,int l,int r,long t,int n){
		int j;
		//System.out.println(l+" "+r);
		if(l==r){
			if(arr[l]<t){
				tree[i]=1;
			}
			al[i].add(arr[l]);
			//System.out.println(i+" "+tree[i]);

			return tree[i];
		}
		int mid=(l+r)/2,lq,rq,rr;
		tree[i]=build(2*i+1,l,mid,t,n)+build(2*i+2,mid+1,r,t,n);
		long ad;
		for(j=l;j<=r;j++){
			if(j>n-1) continue;
			if(l==0){
				ad=pre[j];
			}
			else ad=pre[j]-pre[l-1];
			al[i].add(ad);
		}
		Collections.sort(al[i]);
		for(j=l;j<=mid;j++){
			if(j>n-1) continue;
			if(mid==n-1) ad=post[j];
			else ad=post[j]-post[mid+1];
			lq=0;
			rq=al[2*i+2].size()-1;
			rr=-1;
			while(lq<=rq){
				int m=(lq+rq)/2;
				if(ad+al[2*i+2].get(m)>=t){
					rq=m-1;
				}
				else{
					rr=m;
					lq=m+1;
				}
			}
			lq=0;
			rq=al[2*i+2].size()-1;
			tree[i]+=rr+1;
		}
		//System.out.println(i+" "+tree[i]);
		//System.out.println(i+" "+al[i]); 
		return tree[i];
	} 
	public static void main(String[] args) {

		InputReader s = new InputReader(System.in);
		PrintWriter w = new PrintWriter(System.out);
		int n=s.nextInt(),i;
		int len=(int)Math.ceil(Math.log(n)/Math.log(2));
		int l=(int)Math.pow(2,len);
		arr=new long[n];
		pre=new long[n];
		post=new long[n];
		int lent=(int)Math.pow(2,len+1)-1;
		tree=new long[lent];
		al=new ArrayList[lent];
		long t=s.nextLong();
		for(i=0;i<n;i++){
			arr[i]=s.nextLong();
			if(i==0) pre[i]=arr[i];
			else pre[i]=pre[i-1]+arr[i];
		}
		for(i=0;i<lent;i++){
			al[i]=new ArrayList<Long>();
		}
		post[n-1]=arr[n-1];
		for(i=n-2;i>=0;i--){
			post[i]=post[i+1]+arr[i];
		}
		build(0,0,n-1,t,n);
		System.out.println(tree[0]);
	}
	static class InputReader {
		
		private InputStream stream;
		private byte[] buf = new byte[1024];
		private int curChar;
		private int numChars;
		private SpaceCharFilter filter;
		
		public InputReader(InputStream stream)
		{
			this.stream = stream;
		}
		
		public int read()
		{
			if (numChars==-1) 
				throw new InputMismatchException();
			
			if (curChar >= numChars)
			{
				curChar = 0;
				try 
				{
					numChars = stream.read(buf);
				}
				catch (IOException e)
				{
					throw new InputMismatchException();
				}
				
				if(numChars <= 0)				
					return -1;
			}
			return buf[curChar++];
		}
	 
		public String nextLine()
		{
			BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
			String str = "";
            try
            {
                str = br.readLine();
            }
            catch (IOException e)
            {
                e.printStackTrace();
            }
            return str;
		}
		public int nextInt()
		{
			int c = read();
			
			while(isSpaceChar(c)) 
				c = read();
			
			int sgn = 1;
			
			if (c == '-') 
			{
				sgn = -1;
				c = read();
			}
			
			int res = 0;
			do 
			{
				if(c<'0'||c>'9') 
					throw new InputMismatchException();
				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 
			{
				if (c < '0' || c > '9')
					throw new InputMismatchException();
				res *= 10;
				res += c - '0';
				c = read();
			}
			while (!isSpaceChar(c));
				return res * sgn;
		}
		
		public double nextDouble() 
		{
			int c = read();
			while (isSpaceChar(c))
				c = read();
			int sgn = 1;
			if (c == '-') 
			{
				sgn = -1;
				c = read();
			}
			double res = 0;
			while (!isSpaceChar(c) && c != '.') 
			{
				if (c == 'e' || c == 'E')
					return res * Math.pow(10, nextInt());
				if (c < '0' || c > '9')
					throw new InputMismatchException();
				res *= 10;
				res += c - '0';
				c = read();
			}
			if (c == '.') 
			{
				c = read();
				double m = 1;
				while (!isSpaceChar(c)) 
				{
					if (c == 'e' || c == 'E')
						return res * Math.pow(10, nextInt());
					if (c < '0' || c > '9')
						throw new InputMismatchException();
					m /= 10;
					res += (c - '0') * m;
					c = read();
				}
			}
			return res * sgn;
		}
		
		public String readString() 
		{
			int c = read();
			while (isSpaceChar(c))
				c = read();
			StringBuilder res = new StringBuilder();
			do 
			{
				res.appendCodePoint(c);
				c = read();
			} 
			while (!isSpaceChar(c));
			
			return res.toString();
		}
	 
		public boolean isSpaceChar(int c) 
		{
			if (filter != null)
				return filter.isSpaceChar(c);
			return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
		}
	 
		public String next() 
		{
			return readString();
		}
		
		public interface SpaceCharFilter 
		{
			public boolean isSpaceChar(int ch);
		}
	}
    
}