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 
/*
 * 
 * @Author  Ajudiya_13(Bhargav Girdharbhai Ajudiya)
 * Dhirubhai Ambani Institute of Information And Communication Technology 
 * 
 */


import java.util.*;
import java.io.*;
import java.lang.*;

public class Code336
{
	static class SegmentTree
	{
		long st[][];
		
		SegmentTree(long[] a,int n)
		{
			int x = (int)Math.ceil(Math.log(n)/Math.log(2));
			
			int Max_Size = 2*(int)(Math.pow(2, x))-1;
			
			st= new long[Max_Size][];
			
			constructSegTreeUtil(a,0,n-1,0);
		}
		
		int getMid(int start,int end)
		{
			return (start+end)/2;
		}
		
		void constructSegTreeUtil(long[] a,int ss,int se,int si)
		{
			st[si] = new long[se-ss+1];
			if(ss==se)
			{
				st[si][0] = a[ss];
				return;
			}
			
			int mid = getMid(ss, se);
			constructSegTreeUtil(a, ss, mid, 2*si+1);
			constructSegTreeUtil(a, mid+1, se, 2*si+2);
			
			merge(si,2*si+1,2*si+2);
		}
		
		void merge(int si,int left,int right)
		{
			int n = st[left].length;
			int m = st[right].length;
			
			int i = 0;
			int j = 0;
			int k = 0;
			
			while(i<n && j<m)
			{
				if(st[left][i]<=st[right][j])
				{
					st[si][k] = st[left][i];
					i++;
				}
				else
				{
					st[si][k] = st[right][j];
					j++;
				}
				k++;
			}
			
			while(i<n)
			{
				st[si][k] = st[left][i];
				i++;
				k++;
			}
			
			while(j<m)
			{
				st[si][k] = st[right][j];
				j++;
				k++;
			}
			
		}
		long getSum(int n, int qs, int qe, long key)
		{
			if(qs<0 || qe>n-1 || qs>qe)
				return -1;
			
			return getSumUtil(0,n-1,qs,qe,0,key);
		}
		
		long getSumUtil(int ss, int se,int qs, int qe, int si,long key)
		{
			if(qs<=ss && qe>=se)
				return binarysearch(si,key);
			
			if(qs>se || qe<ss)
				return 0;
			
			int mid = getMid(ss, se);
			
			return getSumUtil(ss, mid, qs, qe, 2*si+1, key)+
					getSumUtil(mid+1, se, qs, qe, 2*si+2, key);
		}
		
		long binarysearch(int si,long key)
		{
			int start = 0;
			int end = st[si].length-1;
			
			int ans = -1;
			while(start<=end)
			{
				int mid = (start+end)/2;
				if(st[si][mid]<key)
				{
					ans = mid;
					start = mid+1;
				}
				else
					end = mid -1;
			}
			
			return (ans+1);
		}
	}
	public static void main(String[] args)
	{
		InputReader in = new InputReader(System.in);
		PrintWriter pw = new PrintWriter(System.out);
		
		int n = in.nextInt();
		long t = in.nextLong();
		long[] a = new long[n];
		for(int i=0;i<n;i++)
			a[i] = in.nextLong();
		
		for(int i=1;i<n;i++)
			a[i] += a[i-1];
		
		long ans = 0;
		
		SegmentTree st = new SegmentTree(a, n);
		for(int i=0;i<n;i++)
		{
			if(i==0)
				ans += st.getSum(n, i, n-1, t);
			else
				ans += st.getSum(n, i, n-1, t+a[i-1]);
		}
		
		pw.println(ans);
		pw.flush();
		pw.close();
	}
	
	static class InputReader 
	{
		 
		private final InputStream stream;
		private final byte[] buf = new byte[8192];
		private int curChar, snumChars;
		private SpaceCharFilter filter;
 
		public InputReader(InputStream stream) 
		{
			this.stream = stream;
		}
 
		public int snext() 
		{
			if (snumChars == -1)
				throw new InputMismatchException();
			if (curChar >= snumChars) 
			{
				curChar = 0;
				try 
				{
					snumChars = stream.read(buf);
				} 
				catch (IOException e) 
				{
					throw new InputMismatchException();
				}
				if (snumChars <= 0)
					return -1;
			}
			return buf[curChar++];
		}
 
		public int nextInt() 
	    {
			int c = snext();
			while (isSpaceChar(c)) 
			{
				c = snext();
			}
			int sgn = 1;
			if (c == '-')
		    {
				sgn = -1;
				c = snext();
			}
			int res = 0;
			do 
			{
				if (c < '0' || c > '9')
					throw new InputMismatchException();
				res *= 10;
				res += c - '0';
				c = snext();
			} while (!isSpaceChar(c));
			return res * sgn;
		}
 
		public long nextLong()
	    {
			int c = snext();
			while (isSpaceChar(c)) 
			{
				c = snext();
			}
			int sgn = 1;
			if (c == '-') 
			{
				sgn = -1;
				c = snext();
			}
			long res = 0;
			do 
			{
				if (c < '0' || c > '9')
					throw new InputMismatchException();
				res *= 10;
				res += c - '0';
				c = snext();
			} while (!isSpaceChar(c));
			return res * sgn;
		}
 
		public int[] nextIntArray(int n) 
		{
			int a[] = new int[n];
			for (int i = 0; i < n; i++) 
			{
				a[i] = nextInt();
			}
			return a;
		}
 
		public String readString()
	    {
			int c = snext();
			while (isSpaceChar(c)) 
			{
				c = snext();
			}
			StringBuilder res = new StringBuilder();
			do 
			{
				res.appendCodePoint(c);
				c = snext();
			} while (!isSpaceChar(c));
			return res.toString();
		}
 
		public String nextLine() 
		{
			int c = snext();
			while (isSpaceChar(c))
				c = snext();
			StringBuilder res = new StringBuilder();
			do 
			{
				res.appendCodePoint(c);
				c = snext();
			} while (!isEndOfLine(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;
		}
 
		private boolean isEndOfLine(int c) 
		{
			return c == '\n' || c == '\r' || c == -1;
		}
 
		public interface SpaceCharFilter
	    {
			public boolean isSpaceChar(int ch);
		}
	}
}