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.BufferedReader;
import java.io.BufferedWriter;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.io.Writer;
import java.util.StringTokenizer;

public class Solution {

	static InputReader in = new InputReader(System.in);
	static OutputWriter out = new OutputWriter(System.out);
	static int exp = (int) (1e9);

	public static void main(String[] args) {
		int n = in.nextInt();
		long k = in.nextLong();
		long[] sum = new long[n + 1];
		for (int i = 1; i <= n; i++) {
			sum[i] = sum[i - 1] + in.nextInt();
		}

		long ans = 0;
		Treap treap = new Treap();
		for (int i = n; i >= 1; i--) {
			treap.add(sum[i]);
			ans += treap.orderOf(sum[i - 1] + k);
		}

		System.out.println(ans);

	}

	static class Treap {

		static class Node {
			long key;
			double priority;
			Node left, right;
			int size;

			Node(long key) {
				this.key = key;
				priority = Math.random();
				size = 1;
			}

			void update() {
				size = 1 + getSize(left) + getSize(right);
			}

			int getSize(Node root) {
				return root == null ? 0 : root.size;
			}
		}

		Node root;

		void add(long k) {
			root = add(root, k);
		}

		long get(int k) {
			return get(root, k);
		}

		int getSize(Node root) {
			return root == null ? 0 : root.size;
		}

		int size() {
			return getSize(root);
		}

		int orderOf(long k) {
			return orderOf(root, k);
		}

		int orderOf(Node temp, long k) {
			if (temp == null)
				return 0;
			if (temp.key < k)
				return getSize(temp.left) + 1 + orderOf(temp.right, k);
			else
				return orderOf(temp.left, k);
		}

		Node splitL, splitR;

		void splitRecursive(Node t, long x) {
			if (t == null) {
				splitL = null;
				splitR = null;
				return;
			}

			if (t.key <= x) {
				splitRecursive(t.right, x);
				t.right = splitL;
				splitL = t;
			} else {
				splitRecursive(t.left, x);
				t.left = splitR;
				splitR = t;
			}
			t.update();
		}

		Node merge(Node left, Node right) {
			if (left == null)
				return right;
			if (right == null)
				return left;
			if (left.priority > right.priority) {
				left.right = merge(left.right, right);
				left.update();
				return left;
			} else {
				right.left = merge(left, right.left);
				right.update();
				return right;
			}
		}

		Node add(Node root, long x) {
			splitRecursive(root, x);
			return merge(merge(splitL, new Node(x)), splitR);
		}

		long get(Node n, long k) {
			if (n == null)
				return -1;
			int key = getSize(n.left) + 1;
			if (key > k)
				return get(n.left, k);
			else if (key < k)
				return get(n.right, k - key);
			return n.key;
		}

	}

}

class OutputWriter {
	public PrintWriter writer;

	public OutputWriter(OutputStream outputStream) {
		writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));
	}

	public OutputWriter(Writer writer) {
		this.writer = new PrintWriter(writer);
	}

	public void print(Object... objects) {
		for (int i = 0; i < objects.length; i++) {
			if (i != 0)
				writer.print(' ');
			writer.print(objects[i]);
		}
	}

	public void println(Object... objects) {
		print(objects);
		writer.println();
	}

	public void close() {
		writer.close();
	}
}

class InputReader {
	private BufferedReader reader;
	private StringTokenizer tokenizer;

	public InputReader(InputStream stream) {
		reader = new BufferedReader(new InputStreamReader(stream), 32768);
		tokenizer = null;
	}

	public String next() {
		while (tokenizer == null || !tokenizer.hasMoreTokens()) {
			try {
				tokenizer = new StringTokenizer(reader.readLine());

			} catch (IOException e) {
				throw new RuntimeException(e);
			}
		}
		return tokenizer.nextToken();
	}

	public String readLine() {
		try {
			return reader.readLine();
		} catch (IOException e) {
			throw new RuntimeException(e);
		}
	}

	public char nextChar() {
		return next().charAt(0);
	}

	public int nextInt() {
		return Integer.parseInt(next());
	}

	public long nextLong() {
		return Long.parseLong(next());
	}

	public double nextDouble() {
		return Double.parseDouble(next());
	}

	public float nextFloat() {
		return Float.parseFloat(next());
	}

}