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.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.InputMismatchException;
import java.util.TreeSet;
		    
		    
		    
		                                                public class Solution1 implements Runnable
		                                                {
		                                                    static final long MAX = 464897L;
		                                                    static class InputReader
		                                                    {
		                                                        private InputStream stream;
		                                                        private byte[] buf = new byte[1024];
		                                                        private int curChar;
		                                                        private int numChars;
		                                                        private SpaceCharFilter filter;
		                                                        private BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
		                                                 
		                                                        public InputReader(InputStream stream)
		                                                        {
		                                                            this.stream = stream;
		                                                        }
		                                                        
		                                                        public int read()
		                                                        {
		                                                            if (numChars==-1) 
		                                                                throw new InputMismatchException();
		                                                            
		                                                            if (curChar >= numChars)
		                                                            {
		                                                                curChar = 0;
		                                                                try 
		                                                                {
		                                                                    numChars = stream.read(buf);
		                                                                }
		                                                                catch (IOException e)
		                                                                {
		                                                                    throw new InputMismatchException();
		                                                                }
		                                                                
		                                                                if(numChars <= 0)                
		                                                                    return -1;
		                                                            }
		                                                            return buf[curChar++];
		                                                        }
		                                                     
		                                                        public String nextLine()
		                                                        {
		                                                            String str = "";
		                                                            try
		                                                            {
		                                                                str = br.readLine();
		                                                            }
		                                                            catch (IOException e)
		                                                            {
		                                                                e.printStackTrace();
		                                                            }
		                                                            return str;
		                                                        }
		                                                        public int nextInt()
		                                                        {
		                                                            int c = read();
		                                                            
		                                                            while(isSpaceChar(c)) 
		                                                                c = read();
		                                                            
		                                                            int sgn = 1;
		                                                            
		                                                            if (c == '-') 
		                                                            {
		                                                                sgn = -1;
		                                                                c = read();
		                                                            }
		                                                            
		                                                            int res = 0;
		                                                            do 
		                                                            {
		                                                                if(c<'0'||c>'9') 
		                                                                    throw new InputMismatchException();
		                                                                res *= 10;
		                                                                res += c - '0';
		                                                                c = read();
		                                                            }
		                                                            while (!isSpaceChar(c)); 
		                                                            
		                                                            return res * sgn;
		                                                        }
		                                                        
		                                                        public long nextLong() 
		                                                        {
		                                                            int c = read();
		                                                            while (isSpaceChar(c))
		                                                                c = read();
		                                                            int sgn = 1;
		                                                            if (c == '-') 
		                                                            {
		                                                                sgn = -1;
		                                                                c = read();
		                                                            }
		                                                            long res = 0;
		                                                            
		                                                            do 
		                                                            {
		                                                                if (c < '0' || c > '9')
		                                                                    throw new InputMismatchException();
		                                                                res *= 10;
		                                                                res += c - '0';
		                                                                c = read();
		                                                            }
		                                                            while (!isSpaceChar(c));
		                                                                return res * sgn;
		                                                        }
		                                                        
		                                                        public double nextDouble() 
		                                                        {
		                                                            int c = read();
		                                                            while (isSpaceChar(c))
		                                                                c = read();
		                                                            int sgn = 1;
		                                                            if (c == '-') 
		                                                            {
		                                                                sgn = -1;
		                                                                c = read();
		                                                            }
		                                                            double res = 0;
		                                                            while (!isSpaceChar(c) && c != '.') 
		                                                            {
		                                                                if (c == 'e' || c == 'E')
		                                                                    return res * Math.pow(10, nextInt());
		                                                                if (c < '0' || c > '9')
		                                                                    throw new InputMismatchException();
		                                                                res *= 10;
		                                                                res += c - '0';
		                                                                c = read();
		                                                            }
		                                                            if (c == '.') 
		                                                            {
		                                                                c = read();
		                                                                double m = 1;
		                                                                while (!isSpaceChar(c)) 
		                                                                {
		                                                                    if (c == 'e' || c == 'E')
		                                                                        return res * Math.pow(10, nextInt());
		                                                                    if (c < '0' || c > '9')
		                                                                        throw new InputMismatchException();
		                                                                    m /= 10;
		                                                                    res += (c - '0') * m;
		                                                                    c = read();
		                                                                }
		                                                            }
		                                                            return res * sgn;
		                                                        }
		                                                        
		                                                        public String readString() 
		                                                        {
		                                                            int c = read();
		                                                            while (isSpaceChar(c))
		                                                                c = read();
		                                                            StringBuilder res = new StringBuilder();
		                                                            do 
		                                                            {
		                                                                res.appendCodePoint(c);
		                                                                c = read();
		                                                            } 
		                                                            while (!isSpaceChar(c));
		                                                            
		                                                            return res.toString();
		                                                        }
		                                                     
		                                                        public boolean isSpaceChar(int c) 
		                                                        {
		                                                            if (filter != null)
		                                                                return filter.isSpaceChar(c);
		                                                            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
		                                                        }
		                                                     
		                                                        public String next() 
		                                                        {
		                                                            return readString();
		                                                        }
		                                                        
		                                                        public interface SpaceCharFilter 
		                                                        {
		                                                            public boolean isSpaceChar(int ch);
		                                                        }
		                                                    }
		                                                     
		                                                    public static void main(String args[]) throws Exception
		                                                    {
		                                                        new Thread(null, new Solution1(),"Solution",1<<26).start();
		                                                    }   
		                                                    static int gcd(int a, int b) 
		                                                    { 
		                                                      if (b == 0) 
		                                                        return a; 
		                                                      return gcd(b, a % b);  
		                                                    } 
		                                                    
		                                                    long MOD = 1000000007;
		                                                    
		                                                    ArrayList<Integer> adj[];
		                                                    public void run() 
		                                                    {
		                                                        
		                                                            //InputReader sc= new InputReader(new FileInputStream("input.txt"));
		                                                            //PrintWriter w= new PrintWriter(new FileWriter("output.txt"));
		                                                            InputReader sc = new InputReader(System.in);
		                                                            PrintWriter w = new PrintWriter(System.out);
		                                                            int n = sc.nextInt();
		                                                            long m = sc.nextLong();
		                                                            long[] arr=  new long[n];
		                                                            for(int i = 0;i < n;i++) {
		                                                            	arr[i] = sc.nextLong();
		                                                            }
		                                                            prefix = new long[n];
		                                                            segTree = new ArrayList[4*n];
		                                                           
		                                                            for(int i = 0;i < n;i++) {
		                                                            	if(i == 0) {
		                                                            		prefix[i] =arr[0];
		                                                            		continue;
		                                                            	}
		                                                           
		                                                            	prefix[i] = prefix[i-1] + arr[i];
		                                                            }
		                                                            build(0, n-1, 0);
		                                                            long ans = 0;
		                                                            for(int i = 0;i < n;i++) {
		                                                            	long temp = query(0, n-1, i, n-1,0,m);
		                                                            	ans += temp;
		                                                            	m = m + arr[i];
		                                                            }
		                                                            w.println(ans);
		                                                            w.close();
		                                                     }
		                                                    long[] prefix;
		                                                    
		                                                    ArrayList<Long> segTree[];
		                                                    void build(int l,int r,int pos){
		                                                		if(l == r){
		                                                			segTree[pos] = new ArrayList();
		                                                			segTree[pos].add(prefix[l]);
		                                                			return;
		                                                		}
		                                                		int mid = (l+r)/2;
		                                                		build(l, mid, 2*pos+1);
		                                                		build(mid+1, r, 2*pos+2);
		                                                		segTree[pos] = merge(segTree[2*pos+1],segTree[2*pos+2]);
		                                                	}
		                                                	ArrayList<Long> merge(ArrayList<Long> a,ArrayList<Long> b){
		                                                		ArrayList<Long> c = new ArrayList();
		                                                		int i = 0;
		                                                		int j = 0;
		                                                		while(i < a.size() && j < b.size()){
		                                                			if(a.get(i) <= b.get(j)){
		                                                				c.add(a.get(i));
		                                                				i++;
		                                                			}else{
		                                                				c.add(b.get(j));
		                                                				j++;
		                                                			}
		                                                		}
		                                                		while(i < a.size()){
		                                                			c.add(a.get(i));
		                                                			i++;
		                                                		}
		                                                		while(j < b.size()){
		                                                			c.add(b.get(j));
		                                                			j++;
		                                                		}
		                                                		return c;
		                                                	}
		                                                	long query(int l,int r,int start,int end,int pos,long val){
		                                                		if(l > end || r < start || l > r){
		                                                			return 0;
		                                                		}
		                                                		if(l >= start && r <= end){
		                                                			int ans = -1;
		                                                			l = 0;
		                                                			r = segTree[pos].size()-1;
		                                                			while(l <= r){
		                                                				int mid = (l + r)/2;
		                                                				if(segTree[pos].get(mid) < val){
		                                                					ans = mid;
		                                                					l = mid+1;
		                                                				}else{
		                                                					r = mid-1;
		                                                				}
		                                                			}
		                                                			return ans+1;
		                                                		}
		                                                		int mid = (l + r)/2;
		                                                		long p1 = query(l,mid, start, end, 2*pos+1, val);
		                                                		long p2 = query(mid+1, r, start, end, 2*pos+2, val);
		                                                		return (p1+p2);
		                                                	}
		                                                    class Pair implements Comparable<Pair>{
		                                                        long a;
		                                                        int b;
		                                                        //int c;
		                                                        Pair(long a,int b){
		                                                            this.b = b;
		                                                            this.a = a;
		                                                        }
		                                                        public boolean equals(Object o) {
		                                                            Pair p = (Pair)o;
		                                                            return this.a == p.a && this.b == p.b;
		                                                        }
		                                                        public int hashCode(){
		                                                            return Long.hashCode(a)*27 + Long.hashCode(b)* 31;
		                                                        }
		                                                        public int compareTo(Pair p) {
		                                                            return Long.compare(this.a,p.a);
		                                                        }
		                                                    }
		                                    }