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

public class A {

	static class pair implements Comparable<pair> {

		int f;
		ArrayList<Integer> s;

		public pair() {

		}

		public pair(int a, ArrayList<Integer> b) {
			f = a;
			s = b;

		}

		@Override
		public int compareTo(pair o) {
			// TODO Auto-generated method stub
			return this.s.size() - o.s.size();
		}

	}

	static int mod = 998244353;
	static int ar[];
	static Scanner sc = new Scanner(System.in);
	static StringBuilder out = new StringBuilder();
	static ArrayList<Integer> gr[] = new ArrayList[100000];

	static void buildGraph(int n, int m) throws IOException {

		gr = new ArrayList[n];

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

			gr[i] = new ArrayList<>();

		}

		for (int i = 0; i < m; i++) {
			int u = sc.nextInt();
			int v = sc.nextInt();

			u--;
			v--;
			gr[u].add(v);
			gr[v].add(u);
		}

	}

	static void sort(int a[], int n) {

		ArrayList<Integer> al = new ArrayList<>();

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

			al.add(a[i]);
		}

		Collections.sort(al);

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

			a[i] = al.get(i);
		}
	}

	static long[] in(int n) throws IOException {

		long a[] = new long[n];
		for (int i = 0; i < n; i++)
			a[i] = sc.nextInt();
		return a;
	}

	static int pri[] = new int[(int) 1e5 + 5];

	static void sieve() {
		pri[1] = 1;
		for (int i = 2; i < pri.length; i++) {
			pri[i] = i;
		}
		for (int i = 2; i < Math.sqrt(pri.length); i++) {
			if (pri[i] != i)
				continue;

			for (int j = i * i; j < pri.length; j += i) {
				if (pri[j] == j)
					pri[j] = i;
			}

		}
	}
	
	static int bit[]=new int [(int)1e6+5];
	static int n=(int)1e6;
	
	static void add(int x,int val) {
		
		for(; x<=n;x+=(x&-x))bit[x]+=val;
		
	}
	static int get(int x) {
		
		
		int ans=0;
		for(; x>0;x-=(x&-x))ans+=bit[x];
		return ans;
	}

	public static void main(String[] args) throws IOException {

		// sieve();
		int t =1;// sc.nextInt();
		while (t-- > 0) {

			
			int n=sc.nextInt();
			no=sc.nextLong();
			long a[]=in(n);
			
			
			long ans=divideAndConquor(0,n-1,a);
			
			out.append(ans+"\n");
			
		}

		System.out.println(out);
	}
	
	
	static long divideAndConquor(int l,int r,long []a) {
		
		if(l==r) {
			if(a[l]<no)return 1;
			else return 0;
		}
		int mid=(l+r)/2;
		
		long left=divideAndConquor(l,mid,a);
		long right=divideAndConquor(mid+1,r,a);
		
		long ans=solve(l,r,mid,a)+left+right;
		
		return ans;
		
	}
	
	static long dp[]=new long [2*(int)1e5+5],no;
	static long solve(int l, int r,int mid,long a[]) {
		
		
		
		
		long ans=0;
		
		
		
		for(int i=mid;i>=l;i--) {
			
			if(i==mid)dp[i]=a[i];
			
			else 
			dp[i]=dp[i+1]+a[i];
			
		}
		
		ArrayList<Long>al=new ArrayList<>();
		
		
		
		long sum=0;
		for(int i=mid+1;i<=r;i++) {
			
			
			if(i==mid+1) {
				sum=a[i];
			}
			else {
				
				sum+=a[i];
			}
			al.add(sum);
			
		}
		
		Collections.sort(al);
		
		
		for(int i=l;i<=mid;i++) {
			
			
			int lo=0;
			int hi=al.size()-1;
			
			long val=no-dp[i];
			
			long res=0;
			
			while(lo<=hi) {
				
				int m=(lo+hi)/2;
				
				if(al.get(m)<val) {
					
					res=m+1;
					lo=m+1;
				}
				else hi=m-1;
			}
			
			ans+=res;
			
		}
		
		
		return ans;
		
	}
	
	
// static Reader sc = new Reader();

	static 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[64]; // line length
			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();
		}
	}

}
