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 
                           /* Rajkin Hossain */
import java.io.*;
import java.util.*;

public class C {

    //static FastInput k = new FastInput("/home/rajkin/Desktop/input.txt");
	static FastInput k = new FastInput(System.in);
    static FastOutput z = new FastOutput();
    static int n;
    static long t;
    
	public static void main(String [] args) throws FileNotFoundException {        
		while(k.hasNext()) {
			n = k.nextInt();
			t = k.nextLong();
			
			Treap treap = new Treap();
			
			long sum[] = new long[n+1];
			for(int i = 1; i<=n; i++){
				long x = k.nextLong();
	            sum[i] = sum[i-1] + x;
			}

	        long ans = 0;
	        for(int i = n; i >= 1; i--){
	            treap.insert(sum[i]);
	            ans += treap.orderOf(sum[i-1] + t);
	        }
			
			z.println(ans);
        }
		
        z.flush();
        System.exit(0);
	}
	
	
	/* MARK: Treap implementation */
	
	static class Treap {
		Node root;
		long g_seed;
		
		public Treap(){
			g_seed = 1l;
		}
		
		long fastrand() { 
			g_seed = (214013*g_seed+2531011); 
			
			return (g_seed>>16)&0x7FFF; 
		} 
		
		int getSize(Node cursor){
			if(cursor == null) return 0;
			int leftSubTreeSize = cursor.left != null ? cursor.left.size : 0;
			int rightSubTreeSize = cursor.right != null ? cursor.right.size : 0;
			
			return 1 + leftSubTreeSize + rightSubTreeSize;
		}
		
		void insert(long value){
			root = insert(root, value);
			root.size = 1 + getSize(root.left) + getSize(root.right);
		}
		
		Node rotateRight(Node cursor){
			Node returedNode = cursor.left;
			
			Node z = cursor.left.right;
			cursor.left.right = cursor;
			cursor.left = z;
			
			return returedNode;
		}
		
		Node rotateLeft(Node cursor){
			Node returedNode = cursor.right;
			
			Node z = cursor.right.left;
			cursor.right.left = cursor;
			cursor.right = z;
			
			return returedNode;
		}
		
		Node insert(Node cursor, long value){
			if(cursor == null) {
				return new Node(value);
			}
			
			if(value < cursor.value){
				cursor.left = insert(cursor.left, value);
				
				if(cursor.left.priority > cursor.priority){
					cursor = rotateRight(cursor);
				}
			}
			else{
				cursor.right = insert(cursor.right, value);
				
				if(cursor.right.priority > cursor.priority){
					cursor = rotateLeft(cursor);
				}
			}
			
			if(cursor.left != null) cursor.left.size = getSize(cursor.left);
			if(cursor.right != null) cursor.right.size = getSize(cursor.right);
			
			cursor.size = getSize(cursor);
			
			return cursor;
		}
		
		int orderOf(long key){ // less than key
			return orderOf(root, key);
		}
		
		int orderOf(Node cursor, long key){ // less than key
			if(cursor == null) return 0;
			else if(cursor.value < key) return getSize(cursor.left) + 1 + orderOf(cursor.right, key);
			else return orderOf(cursor.left, key);
		}
		
        void print(Node root) {
            if (root == null)
                return;
            print(root.left);
            System.out.println(root.value);
            print(root.right);
        }
		
		class Node {
			long priority;
			long value;
			
			int size;
			
			Node left, right;
			
			public Node(long value){
				this.value = value;
				this.priority = fastrand();
			}
		}
	}
	

    /* MARK: FastInput and FastOutput implementation */
	 
	static class FastInput {
        InputStream inputStream;
        private byte[] inbuf = new byte[1024];
        private int lenbuf = 0, ptrbuf = 0;

        public FastInput(InputStream inputStream) {
        	this.inputStream = inputStream;
        }
        
        public FastInput(String filePath){
        	try {
				inputStream = new FileInputStream(filePath);
			} catch (FileNotFoundException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			}
        }
        
        public boolean hasNext() {
        	try {
				return inputStream.available() > 0;
			} catch (IOException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			}
        	
        	return false;
        }

        public int readByte() {
            if (lenbuf == -1) throw new InputMismatchException();
            if (ptrbuf >= lenbuf) {
                ptrbuf = 0;
                try {
                    lenbuf = inputStream.read(inbuf);
                } 
                catch (IOException e) {
                    throw new InputMismatchException();
                }
                
                if (lenbuf <= 0) return -1;
            }
            
            return inbuf[ptrbuf++];
        }

        public boolean isSpaceChar(int c) {
            return !(c >= 33 && c <= 126);
        }
        
        private boolean isEndOfLine(int c) {
            return c == '\n' || c == '\r' || c == -1;
        }

        public int skip() {
            int b;
            while ((b = readByte()) != -1 && isSpaceChar(b)) ;
            
            return b;
        }

        public String next() {
            int b = skip();
            StringBuilder sb = new StringBuilder();
            while (!(isSpaceChar(b))) {
                sb.appendCodePoint(b);
                b = readByte();
            }
            
            return sb.toString();
        }

        public String nextLine() {
            int c = skip();
            StringBuilder sb = new StringBuilder();
            while (!isEndOfLine(c)){
                sb.appendCodePoint(c);
                c = readByte();
            }
            
            return sb.toString();
        }

        public int nextInt() {
            int num = 0, b;
            boolean minus = false;
            while ((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-')) ;
            if (b == '-') {
                minus = true;
                b = readByte();
            }
            
            while (true) {
                if (b >= '0' && b <= '9') {
                    num = (num << 3) + (num << 1) + (b - '0');
                } 
                else {
                    return minus ? -num : num;
                }
                
                b = readByte();
            }
        }

        public long nextLong() {
            long num = 0;
            int b;
            boolean minus = false;
            while ((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-')) ;
            
            if (b == '-') {
                minus = true;
                b = readByte();
            }

            while (true) {
                if (b >= '0' && b <= '9') {
                    num = (num << 3) + (num << 1) + (b - '0');
                } 
                else {
                    return minus ? -num : num;
                }
                
                b = readByte();
            }
        }

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

        public char[] next(int n) {
            char[] buf = new char[n];
            int b = skip(), p = 0;
            while (p < n && !(isSpaceChar(b))) {
                buf[p++] = (char) b;
                b = readByte();
            }
            
            return n == p ? buf : Arrays.copyOf(buf, p);
        }

        public char readChar() {
            return (char) skip();
        }
    }
 
    static class FastOutput extends PrintWriter {
    	public FastOutput() { 
            super(new BufferedOutputStream(System.out)); 
    	}
    }
}