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.util.*;
import java.io.*;
import java.math.*;
 
public class Main {
    public static void main(String[] args) throws IOException {
        PrintWriter out = new PrintWriter(System.out);
        //Scanner sc = new Scanner();
        Reader in = new Reader();
        Main solver = new Main();
        solver.solve(out, in);
        out.flush();
        out.close();
 
    }
 
    //<>
    
    static int maxn = (int)1e5*4+1;
    static long mod=(int)1e9+7;
    static int n,m,k;
    
    static long t,sort[];
    static Map<Long,Integer> map;
    static int BIT[];
    
    void solve(PrintWriter out, Reader in) throws IOException{   
        n = in.nextInt();
        t = in.nextLong();
        
        long[] arr = new long[n+1];
        sort = new long[n+1];
        for(int i=0;i<n;i++) arr[i] = in.nextLong();
        arr[n] = t;
        
        sort[0] = arr[0];
        for(int i=1;i<n;i++) sort[i] += sort[i-1]+arr[i];
        sort[n] = 1000000000000000L;
        Arrays.sort(sort);
        
        map = new HashMap<>();
        map.put(1000000000000000L,maxn);
        for(int i=0;i<n;i++) map.put(sort[i],map.getOrDefault(sort[i],2*(i+1)));
        
        
        BIT = new int[400001];
        
        
        long ans=0,temp=0;
        for(int i=0;i<n-1;i++){
            temp+=arr[i];
            update(map.get(temp));
            
            int y = bs(temp+arr[i+1]);
            ans+= i+1-query(y);
        }
        for(int i=0;i<n;i++) 
            if(sort[i]<t) ans++;
        
        out.println(ans);
    }
    
    static int bs(long a){
        int lo=0,hi=n,mid,res=-1;
        
        while(lo<=hi){
            mid = (lo+hi)/2;
            if(sort[mid]>a-t){
                res = mid;
                hi=mid-1;
            }else{
                lo = mid+1;
            }
        }
        
        return map.get(sort[res])-1;
    }
    
    static void update(int x){
        for(int i=x;i<maxn;i+=(i&(-i)))
            BIT[i]++;
        return;
    }
    
    static int query(int x){
        int sum=0;
        for(int j=x;j>0;j-=(j&(-j)))
            sum+=BIT[j];
            
        return sum;
    }
    
    static class Edge {
        int x,y,w;
        
        Edge(int x,int y,int w){
            this.x = x;
            this.y = y;
            this.w = w;
        }
    }
    
    
    static class Reader {
 
        private InputStream mIs;
        private byte[] buf = new byte[1024];
        private int curChar;
        private int numChars;
 
        public Reader() {
            this(System.in);
        }
 
        public Reader(InputStream is) {
            mIs = is;
        }
 
        public int read() {
            if (numChars == -1) {
                throw new InputMismatchException();
 
        }
            if (curChar >= numChars) {
                curChar = 0;
                try {
                    numChars = mIs.read(buf);
                } catch (IOException e) {
                    throw new InputMismatchException();
                }
                if (numChars <= 0) {
                    return -1;
                }
            }
            return buf[curChar++];
        }
 
        public String nextLine() {
            int c = read();
            while (isSpaceChar(c)) {
                c = read();
            }
            StringBuilder res = new StringBuilder();
            do {
                res.appendCodePoint(c);
                c = read();
            } while (!isEndOfLine(c));
            return res.toString();
        }
 
        public String next() {
            int c = read();
            while (isSpaceChar(c)) {
                c = read();
            }
            StringBuilder res = new StringBuilder();
            do {
                res.appendCodePoint(c);
                c = read();
            } while (!isSpaceChar(c));
            return res.toString();
        }
 
        double nextDouble()
        {
            return Double.parseDouble(next());
        }
 
        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 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 boolean isSpaceChar(int c) {
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }
 
        public boolean isEndOfLine(int c) {
            return c == '\n' || c == '\r' || c == -1;
        }
 
    }
}