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.math.*;
import java.util.*;

import static java.util.Arrays.fill;
import static java.lang.Math.*;
import static java.util.Arrays.sort;
import static java.util.Collections.sort;

public class D {
	static int mod = 1000000007;
	static InputReader in = new InputReader(System.in);
	static PrintWriter out = new PrintWriter(System.out);

	static int n;
	static long t;
	static long[] sum;
	static long[] a;
	static int[] tree;
	
	static void updatetree(int node,int start,int end,int idx,int val)
	{
		if(start>end)
		{
			return;
		}
		if(start==end)
		{
			tree[node]+=val;
			return;
		}
		int mid=(start+end)/2;
		if(start<=idx && mid>=idx)
		updatetree(2*node, start, mid, idx, val);
		else
		updatetree(2*node+1, mid+1, end, idx, val);
		tree[node]=tree[2*node]+tree[2*node+1];
	}
	
	static int query(int node,int start,int end,int l,int r)
	{
		if(start>r||end<l||start>end)
		{
			return 0;
		}
		if(start>=l&&end<=r)
		{
			return tree[node];
		}
		int mid=(start+end)/2;
		int p1=query(2*node, start, mid, l, r);
		int p2=query(2*node+1, mid+1, end, l, r);
		return (p1+p2);
	}
	
	
	public static void main(String[] args) {

		n=in.nextInt();
		t=in.nextLong();
		sum=new long[n+1];
		a=new long[n+1];
		tree=new int[5*n];
		for(int i=1;i<=n;i++)
		{
			a[i]=in.nextLong();
			sum[i]=sum[i-1]+a[i];
		}
		long[] sum2=Arrays.copyOfRange(sum, 1, n+1);
		Arrays.sort(sum2);
		HashMap<Long, Integer> map=new HashMap<>();
		int j=1;
		TreeSet<Long> set=new TreeSet<>();
		for(int i=0;i<n;i++)
		{
			set.add(sum2[i]);
			if(!map.containsKey(sum2[i]))
			{
				map.put(sum2[i], j++);
			}
		}
		long ans=0;
		for(int i=n;i>=1;i--)
		{
			long maxi=t+sum[i];
			if(sum[i]<t)
				ans++;
			if(set.lower(maxi)==null)
			{
				updatetree(1, 1, n, map.get(sum[i]), 1);
				continue;
			}
			maxi=set.lower(maxi);
			int key=map.get(maxi);
			ans+=query(1, 1, n, 1, key);
			updatetree(1, 1, n, map.get(sum[i]), 1);
		}
		out.println(ans);
		out.close();

	}

	static class InputReader {
		private final InputStream stream;
		private final byte[] buf = new byte[8192];
		private int curChar, snumChars;

		public InputReader(InputStream st) {
			this.stream = st;
		}

		public int read() {
			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 = read();
			while (isSpaceChar(c)) {
				c = read();
			}
			int sgn = 1;
			if (c == '-') {
				sgn = -1;
				c = read();
			}
			int res = 0;
			do {
				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 {
				res *= 10;
				res += c - '0';
				c = read();
			} while (!isSpaceChar(c));
			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 String nextLine() {
			int c = read();
			while (isSpaceChar(c))
				c = read();
			StringBuilder res = new StringBuilder();
			do {
				res.appendCodePoint(c);
				c = read();
			} while (!isEndOfLine(c));
			return res.toString();
		}

		public boolean isSpaceChar(int c) {
			return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
		}

		private boolean isEndOfLine(int c) {
			return c == '\n' || c == '\r' || c == -1;
		}
	}

	private static void tr(Object... o) {
		if (!(System.getProperty("ONLINE_JUDGE") != null))
			System.out.println(Arrays.deepToString(o));
	}
}


