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 D implements Runnable{
	public static void main (String[] args) {new Thread(null, new D(), "_cf", 1 << 28).start();}

	public void run() {
		FastScanner fs = new FastScanner();
		PrintWriter out = new PrintWriter(System.out);
		System.err.println("Go!");

		int n = fs.nextInt();
		long x = fs.nextLong();
		int[] a = fs.nextIntArray(n);
		long[] pres = new long[n];
		long cur = 0;
		for(int i = 0; i < n; i++) {
			cur += a[i];
			pres[i] = cur;
		}
		int nn = 0;
		TreeSet<Long> set = new TreeSet<>();
		for(long ll : pres) set.add(ll);
		nn = set.size();
		TreeMap<Long, Integer> map = new TreeMap<>();
		while(!set.isEmpty()) map.put(set.pollFirst(), map.size());
		long res = 0;
		BIT bit = new BIT(nn);
		for(int i = 0; i < n; i++) {
			long bound = pres[i] - x;
			if(pres[i] < x) res++;
			Long next = map.higherKey(bound);
			if(next == null) {
				bit.update(map.get(pres[i])+1, 1);
				continue;
			}
			int idx = map.get(next);
			int gets = bit.sum(nn);
			if(idx > 0) gets -= bit.sum(idx);
			res += gets;
			bit.update(map.get(pres[i])+1, 1);
		}
		out.println(res);

		out.close();
	}
	
	public class BIT {
		
		int[] bit;
		int n;
		
		public BIT(int a) {
			n = a + 1;
			bit = new int[n];
		}
		
		//Remember that when querying a sum to query the 1-based index of the value.
		
		void update (int index, int val) {
			while(index < n) {
				bit[index] += val;
				index += (index & (-index));
			}
		}
		
		int sum (int index) {
			int sum = 0;
			while(index > 0) {
				sum += bit[index];
				index -= (index & (-index));
			}
			return sum;
		}
	}


	void sort (int[] a) {
		int n = a.length;
		for(int i = 0; i < 50; i++) {
			Random r = new Random();
			int x = r.nextInt(n), y = r.nextInt(n);
			int temp = a[x];
			a[x] = a[y];
			a[y] = temp;
		}
		Arrays.sort(a);
	}

	class FastScanner {
		public int BS = 1<<16;
		public char NC = (char)0;
		byte[] buf = new byte[BS];
		int bId = 0, size = 0;
		char c = NC;
		double num = 1;
		BufferedInputStream in;

		public FastScanner() {
			in = new BufferedInputStream(System.in, BS);
		}

		public FastScanner(String s) throws FileNotFoundException {
			in = new BufferedInputStream(new FileInputStream(new File(s)), BS);
		}

		public char nextChar(){
			while(bId==size) {
				try {
					size = in.read(buf);
				}catch(Exception e) {
					return NC;
				}                
				if(size==-1)return NC;
				bId=0;
			}
			return (char)buf[bId++];
		}

		public int nextInt() {
			return (int)nextLong();
		}

		public long nextLong() {
			num=1;
			boolean neg = false;
			if(c==NC)c=nextChar();
			for(;(c<'0' || c>'9'); c = nextChar()) {
				if(c=='-')neg=true;
			}
			long res = 0;
			for(; c>='0' && c <='9'; c=nextChar()) {
				res = (res<<3)+(res<<1)+c-'0';
				num*=10;
			}
			return neg?-res:res;
		}

		public double nextDouble() {
			double cur = nextLong();
			return c!='.' ? cur:cur+nextLong()/num;
		}

		public String next() {
			StringBuilder res = new StringBuilder();
			while(c<=32)c=nextChar();
			while(c>32) {
				res.append(c);
				c=nextChar();
			}
			return res.toString();
		}

		public String nextLine() {
			StringBuilder res = new StringBuilder();
			while(c<=32)c=nextChar();
			while(c!='\n') {
				res.append(c);
				c=nextChar();
			}
			return res.toString();
		}

		public boolean hasNext() {
			if(c>32)return true;
			while(true) {
				c=nextChar();
				if(c==NC)return false;
				else if(c>32)return true;
			}
		}
		
		public int[] nextIntArray(int n) {
			int[] res = new int[n];
			for(int i = 0; i < n; i++) res[i] = nextInt();
			return res;
		}
		
	}

}