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.io.*;
import java.math.*;
import java.awt.geom.*;

import static java.lang.Math.*;

public class Sol implements Runnable {

	long mod1 = (long) 1e9 + 7;
	int mod2 = 998244353;
	long arr[];
	long n,k;

	public void solve() throws Exception {
		n=sc.nextLong();
		int size=(int)n;
		k=sc.nextLong();
		arr=new long[size];
		for(int i=0;i<n;i++) {
			arr[i]=sc.nextLong();
		}
		out.println(divide(0,size-1));
		

	}
	
	
	public long divide(int l,int r) {
		if(l==r) {
			if(arr[l]<k) {
				return 1;
			}
			else return 0;
		}
		if(l>r) {
			return 0;
		}

		long res = 0;
		int mid=(l+r)/2;
		res+=divide(l,mid);
		res+=divide(mid+1,r);
		long first[]=new long[mid-l+1];
		long second[]=new long[r-mid];
		//out.println(l+" "+r+" "+mid);
		int ctr=l;
		for(int i=0;i<=mid-l;i++) {
			first[i]=arr[ctr];
			ctr++;
		}
		ctr=mid+1;
		for(int i=0;i<=r-mid-1;i++) {
			second[i]=arr[ctr];
			ctr++;
		}
		ctr=mid+2;
		for(int i=1;i<=r-mid-1;i++) {
			second[i]=arr[ctr]+second[i-1];
			ctr++;
		}
		ctr=mid-1;
		for(int i=mid-1-l;i>=0;i--) {
			first[i]=arr[ctr]+first[i+1];
			ctr--;
		}
		ArrayList<Pair> a=new ArrayList<Pair>(); int count=1;
		a.add(new Pair(second[0],1));
		long mx=second[0];
		for(int i=1;i<=r-mid-1;i++) {
			count++;
			if(second[i]>mx) {
				mx=second[i];
				a.add(new Pair(second[i],count));
			}
		}
		int c=0;
		sort(second);
		for(int i=mid-l;i>=0;i--) {
			c++;
			long v=first[i];
			long tofind=k-v;
			res=res+LowerBound(second, tofind);
		}
		//out.println(l+" "+r+" "+mid+" "+res);
//		out.println("fuck");
		return res;
		
	}
	
	static int LowerBound(long a[], long x) { // smallest index having value >= x
		int l = -1, r = a.length;
		while (l + 1 < r) {
			int m = (l + r) >>> 1;
			if (a[m] >= x)
				r = m;
			else
				l = m;
		}
		return r;
	}
	
	
	
	class Pair {
		long val;
		int index;
		public Pair(long val, int index) {
			super();
			this.val = val;
			this.index = index;
		}
		@Override
		public String toString() {
			return "Pair [val=" + val + ", index=" + index + "]";
		}
		
		
	}

	static void sort(long[] a) {
		ArrayList<Long> l = new ArrayList<>();
		for (long i : a)
			l.add(i);
		Collections.sort(l);
		for (int i = 0; i < a.length; i++)
			a[i] = l.get(i);
	}

	static long gcd(long a, long b) {
		if (a == 0)
			return b;
		return gcd(b % a, a);
	}

	static long ncr(int n, int r, long p) {
		if (r > n)
			return 0l;
		if (r > n - r)
			r = n - r;

		long C[] = new long[r + 1];

		C[0] = 1;

		for (int i = 1; i <= n; i++) {

			for (int j = Math.min(i, r); j > 0; j--)
				C[j] = (C[j] + C[j - 1]) % p;
		}
		return C[r] % p;
	}

	public long power(long x, long y, long p) {
		long res = 1;
		// out.println(x+" "+y);
		x = x % p;
		if (x == 0)
			return 0;

		while (y > 0) {
			if ((y & 1) == 1)
				res = (res * x) % p;
			y = y >> 1;
			x = (x * x) % p;
		}
		return res;
	}

	static Throwable uncaught;

	BufferedReader in;
	FastScanner sc;
	PrintWriter out;

	@Override
	public void run() {
		try {
			in = new BufferedReader(new InputStreamReader(System.in));
			out = new PrintWriter(System.out);
			sc = new FastScanner(in);
			solve();
		} catch (Throwable uncaught) {
			Sol.uncaught = uncaught;
		} finally {
			out.close();
		}
	}

	public static void main(String[] args) throws Throwable {
		Thread thread = new Thread(null, new Sol(), "", (1 << 26));
		thread.start();
		thread.join();
		if (Sol.uncaught != null) {
			throw Sol.uncaught;
		}
	}

}

class FastScanner {

	BufferedReader in;
	StringTokenizer st;

	public FastScanner(BufferedReader in) {
		this.in = in;
	}

	public String nextToken() throws Exception {
		while (st == null || !st.hasMoreTokens()) {
			st = new StringTokenizer(in.readLine());
		}
		return st.nextToken();
	}

	public int nextInt() throws Exception {
		return Integer.parseInt(nextToken());
	}

	public int[] readArray(int n) throws Exception {
		int[] a = new int[n];
		for (int i = 0; i < n; i++)
			a[i] = nextInt();
		return a;
	}

	public long nextLong() throws Exception {
		return Long.parseLong(nextToken());
	}

	public double nextDouble() throws Exception {
		return Double.parseDouble(nextToken());
	}

}