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 P1 {
	static FastReader sc=null;
 
	public static void main(String[] args) {
		PrintWriter out=new PrintWriter(System.out);
		sc=new FastReader();
		int n=sc.nextInt();
		long t=sc.nextLong();
		int a[]=sc.readArray(n);
		long pre[]=new long[n+1],sort[]=new long[n+1];
		for(int i=1;i<=n;i++) {
			pre[i]=pre[i-1]+a[i-1];
			sort[i]=pre[i];
		}
		Arrays.sort(sort);
		//ArrayCompression:
		int curr=0;
		TreeMap<Long,Integer> map=new TreeMap<>();
		for(long e:sort) {
			if(map.containsKey(e))continue;
			map.put(e,curr++);
		}
		//System.out.println(map.toString());
		//RANGE SUM:
		int s=map.size();
		SegTree seg=new SegTree(0,s-1);
		long ans=0;
		for(int i=1;i<=n;i++) {
			long g=pre[i]-t;
			if(map.ceilingKey(g)==null) {
				seg.Add(map.get(pre[i]), 1);
				continue;
			}
			int id=map.ceilingEntry(g).getValue();
			if(map.containsKey(g))id++;
			//System.out.println(id);
			long Add=seg.rangeSum(id, s);
			//System.out.println(i+" "+id+" "+Add+" "+g+" "+pre[i]);
			ans+=Add;
			seg.Add(map.get(pre[i]), 1);
			if(pre[i]<t)ans++;
		}
		System.out.println(ans);
		
		out.close();
		
	}

	
	
	
	static class SegTree{
		SegTree left,right;
		int l,r;
		int val=0;
		SegTree(int l,int r){
			this.l=l;
			this.r=r;
			if(l==r) {
				return;
			}
			else {
				int mid=(l+r)/2;
				left=new SegTree(l,mid);
				right=new SegTree(mid+1,r);
			}
			recalc();
		}
//		public void set(int i,long val) {
//			if(l==r) {
//				this.val=val;
//				return;
//			}
//			if(left.r>=i)left.set(i, val);
//			else right.set(i, val);
//			recalc();
//		}
		public void Add(int i,int val) {
			if(l==r) {
				this.val+=val;
				return;
			}
			if(left.r>=i)left.Add(i, val);
			else right.Add(i, val);
			recalc();
		}
		
		
		public void recalc() {
			if(l==r)return;
			this.val=left.val+right.val;
		}
		public long rangeSum(int l,int r) {
			if(l>this.r || r<this.l) return 0;
			else if(l<=this.l && r>=this.r) {
				return this.val;
			}
			else{
				return left.rangeSum(l,r)+right.rangeSum(l, r);
			}	
		}
//		public long rangeMax(int l,int r) {
//			if(l>this.r || r<this.l) return Integer.MIN_VALUE;
//			else if(l<=this.l && r>=this.r) {
//				return this.max;
//			}
//			else{
//				return Math.max(left.rangeMax(l,r),right.rangeMax(l, r));
//			}	
//		}
//		public long rangeMin(int l,int r) {
//			if(l>this.r || r<this.l) return Long.MAX_VALUE;
//			else if(l<=this.l && r>=this.r) {
//				return this.min;
//			}
//			else{
//				return Math.min(left.rangeMin(l,r),right.rangeMin(l, r));
//			}	
//		}
		
	}

	
	
 
	static int[] ruffleSort(int a[]) {
		ArrayList<Integer> al=new ArrayList<>();
		for(int i:a)al.add(i);
		Collections.sort(al);
		for(int i=0;i<a.length;i++)a[i]=al.get(i);
		return a;
	}
	
	
	
	static void print(ArrayList<Integer> al) {
		for(int e:al) {
			System.out.print(e+" ");
		}
		System.out.println();
	}
	
	static void print(int a[]) {
		for(int e:a) {
			System.out.print(e+" ");
		}
		System.out.println();
	}
	
	static void print(char a[]) {
		for(char e:a) {
			System.out.print(e);
		}
		System.out.println();
	}
	
	static void print(long a[]) {
		for(long e:a) {
			System.out.print(e+" ");
		}
		System.out.println();
	}
	
	static long gcd(long a,long b) {
		if(b==0)return a;
		else return gcd(b,a%b);
	}
	
	static class FastReader 
    { 
        BufferedReader br; 
        StringTokenizer st; 
  
        public FastReader() 
        { 
            br = new BufferedReader(new
                     InputStreamReader(System.in)); 
        } 
  
        String next() 
        { 
            while (st == null || !st.hasMoreElements()) 
            { 
                try
                { 
                    st = new StringTokenizer(br.readLine()); 
                } 
                catch (IOException  e) 
                { 
                    e.printStackTrace(); 
                } 
            } 
            return st.nextToken(); 
        } 
  
        int nextInt() 
        { 
            return Integer.parseInt(next()); 
        } 
  
        long nextLong() 
        { 
            return Long.parseLong(next()); 
        } 
  
        double nextDouble() 
        { 
            return Double.parseDouble(next()); 
        } 
  
        String nextLine() 
        { 
            String str = ""; 
            try
            { 
                str = br.readLine(); 
            } 
            catch (IOException e) 
            { 
                e.printStackTrace(); 
            } 
            return str; 
        } 
        int[] readArray(int n) {
    		int a[]=new int [n];
    		for(int i=0;i<n;i++) {
    			a[i]=sc.nextInt();
    		}
    		return a;
    	}
    } 
}