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 
//package sept;

import java.io.*;
import java.util.*;

public class CodeAgon {
    InputStream is;
    PrintWriter out;
    String INPUT = "";
    //boolean debug=true;
    boolean debug=false;
    
	void solve()
	{
		int n=ni();
		long t=nl();
		int[] a=na(n);
		ArrayList<Long> list=new ArrayList<>();
		list.add((long)0);
		long curr=0;
		for(int i=0;i<n;i++)
		{
			curr+=a[i];
			list.add(curr);
		}
		Collections.sort(list);
		int ind=1;
		/*
		for(int i=1;i<list.size();i++)
		{
			if(list.get(i)!=list.get(i-1))list.set(ind++,list.get(i));
		}
		while(list.size()!=ind)list.remove(list.size()-1);
		*/
		//System.out.println(list.toString());
		long ans=0;
		curr=0;
		int N=(200 * 1000 + 13);
		bit=new long[N];
		ind=Collections.binarySearch(list, (long)0);
		if(ind<0)ind=-ind-2;
		add(ind+1,1,N);
		
		for(int i=0;i<n;i++)
		{
			curr+=a[i];
			
			ind=Collections.binarySearch(list,curr-t+1);
			if(ind<0)ind=-ind-1;
			
			//System.out.println("npos:"+ind);
			long q=query(ind);
			//System.out.println("q:"+q);
			ans+=(i+1-q);
			
			int ind2=Collections.binarySearch(list, curr);
			if(ind2<0)ind2=-ind2-2;
			//System.out.println("k:"+ind2);
			add(ind2+1,1,N);
		}
		
		out.println(ans);
	}
	
	static long bit[];
    //1 based indexing
    static void add(int x,int d,int n)
    {
        for(int i=x;i<=n;i+=i&-i)bit[i]+=d;
    }

    static long query(int x)
    {
        long ret=0;
        for(int i=x;i>0;i-=i&-i)
        ret+=bit[i];
        return ret;
    }
	
	void solveE()
	{
		//tree construction for given max values of indices of two components
		int n=ni();
		int[] a=new int[n-1];
		for(int i=0;i<n-1;i++)
		{
			int u=ni(),v=ni();
			if(v!=n)
			{
				out.println("NO");
				return;
			}
			a[i]=u;
		}
		Arrays.sort(a);
		int l=0;
		int[] vis=new int[n+1];
		int curr=1;
		ArrayList<Pair> ans=new ArrayList<>();
		while(l<n-1)
		{
			int r=l+1;
			while(r<n-1 && a[l]==a[r])r++;
			int next=n;
			while(l<r-1)
			{
				while(vis[curr]==1)curr++;
				ans.add(new Pair(curr,next));
				next=curr;
				vis[curr]=1;
				l++;
			}
			if(vis[a[l]]==1)
			{
				out.println("NO");
				return;
			}
			ans.add(new Pair(next,a[l]));
			vis[a[l]]=1;
			l++;
		}
		out.println("YES");
		for(Pair p:ans)
		{
			out.println(p.a+" "+p.b);
		}
		out.println();
	}
	
	static int[][] packD(int n, int[] from, int[] to) {
		int[][] g = new int[n][];
		int[] p = new int[n];
		for (int f : from)
			p[f]++;
		for (int i = 0; i < n; i++)
			g[i] = new int[p[i]];
		for (int i = 0; i < from.length; i++) {
			g[from[i]][--p[from[i]]] = to[i];
		}
		return g;
	}
	    
    static class Pair
    {
        int a,b;
        public Pair(int a,int b)
        {
            this.a=a;
            this.b=b;
        }
    }
    
    static long lcm(int a,int b)
    {
        long val=a;
        val*=b;
        return (val/gcd(a,b));
    }
    
    static long gcd(long a,long b)
    {
        if(a==0)return b;
        return gcd(b%a,a);
    }
    
    static int pow(int a, int b, int p)
    {
        long ans = 1, base = a;
        while (b!=0)
        {
            if ((b & 1)!=0)
            {
                ans *= base;
                ans%= p;
            }
            base *= base;
            base%= p;
            b >>= 1;
        }
        return (int)ans;
    }

    static int inv(int x, int p)
    {
        return pow(x, p - 2, p);
    }

    
    void run() throws Exception
    {
        if(!debug)oj=true;
        is = oj ? System.in : new ByteArrayInputStream(INPUT.getBytes());
        out = new PrintWriter(System.out);
        
        long s = System.currentTimeMillis();
        solve();
        out.flush();
        tr(System.currentTimeMillis()-s+"ms");
    }
    
    public static void main(String[] args) throws Exception {new CodeAgon().run();}
    
    private byte[] inbuf = new byte[1024];
    public int lenbuf = 0, ptrbuf = 0;
    
    private int readByte()
    {
        if(lenbuf == -1)throw new InputMismatchException();
        if(ptrbuf >= lenbuf){
            ptrbuf = 0;
            try { lenbuf = is.read(inbuf); } catch (IOException e) { throw new InputMismatchException(); }
            if(lenbuf <= 0)return -1;
        }
        return inbuf[ptrbuf++];
    }
    
    private boolean isSpaceChar(int c) { return !(c >= 33 && c <= 126); }
    private int skip() { int b; while((b = readByte()) != -1 && isSpaceChar(b)); return b; }
    
    private double nd() { return Double.parseDouble(ns()); }
    private char nc() { return (char)skip(); }
    
    private String ns()
    {
        int b = skip();
        StringBuilder sb = new StringBuilder();
        while(!(isSpaceChar(b))){ // when nextLine, (isSpaceChar(b) && b != ' ')
            sb.appendCodePoint(b);
            b = readByte();
        }
        return sb.toString();
    }
    
    private char[] ns(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);
    }
    
    private char[][] nm(int n, int m)
    {
        char[][] map = new char[n][];
        for(int i = 0;i < n;i++)map[i] = ns(m);
        return map;
    }
    
    private int[] na(int n)
    {
        int[] a = new int[n];
        for(int i = 0;i < n;i++)a[i] = ni();
        return a;
    }
    
    private int ni()
    {
        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 * 10 + (b - '0');
            }else{
                return minus ? -num : num;
            }
            b = readByte();
        }
    }
    
    private long nl()
    {
        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 * 10 + (b - '0');
            }else{
                return minus ? -num : num;
            }
            b = readByte();
        }
    }
    
    private boolean oj = System.getProperty("ONLINE_JUDGE") != null;
    private void tr(Object... o) { if(!oj)System.out.println(Arrays.deepToString(o)); }
}