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.*;
public class Main
{
    static class InputReader
	{
	    private final InputStream stream;
	    private final byte[] buf = new byte[8192];
	    private int curChar, snumChars;

	    public InputReader(InputStream st) {
	      this.stream = st;
	    }

	    public int read() {
	      if (snumChars == -1)
	        throw new InputMismatchException();
	      if (curChar >= snumChars) {
	        curChar = 0;
	        try {
	          snumChars = stream.read(buf);
	        } catch (IOException e) {
	          throw new InputMismatchException();
	        }
	        if (snumChars <= 0)
	          return -1;
	      }
	      return buf[curChar++];
	    }

	    public int nextInt() {
	      int c = read();
	      while (isSpaceChar(c)) {
	        c = read();
	      }
	      int sgn = 1;
	      if (c == '-') {
	        sgn = -1;
	        c = read();
	      }
	      int res = 0;
	      do {
	        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 {
	        res *= 10;
	        res += c - '0';
	        c = read();
	      } while (!isSpaceChar(c));
	      return res * sgn;
	    }

	    public int[] nextIntArray(int n) {
	      int a[] = new int[n];
	      for (int i = 0; i < n; i++) {
	        a[i] = nextInt();
	      }
	      return a;
	    }

	    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 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 boolean isSpaceChar(int c) {
	      return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
	    }

	    private boolean isEndOfLine(int c) {
	      return c == '\n' || c == '\r' || c == -1;
	    }
	}
    public static int max = 200001;
    public static ArrayList<Long>[] segment = new ArrayList[4*max + 2];
    public static ArrayList<Long> merge(ArrayList<Long> left,ArrayList<Long> right)
    {
        ArrayList<Long> arr = new ArrayList<>();
        int n = left.size(),m = right.size();
        int i = 0,j = 0;
        while(i < n && j < m)
        {
            if(left.get(i) <= right.get(j))
            {
                arr.add(left.get(i));
                i++;
            }
            else if(left.get(i) > right.get(j))
            {
                arr.add(right.get(j));
                j++;
            }
        }
        while(i < n)
        {
            arr.add(left.get(i));i++;
        }
        while(j < m)
        {
            arr.add(right.get(j));j++;
        }
        return arr;
    }
    public static int binary(ArrayList<Long> arr,long k)
    {
        int low = 0,high = arr.size()-1,mid = 0;
        int ans = 0;
        if(k > arr.get(high))
            return arr.size();
        while(high >= low)
        {
            mid = (high + low)/2;
            if(arr.get(mid) == k)
            {
                return mid+1;
            }
            else if(arr.get(mid) < k)
                low = mid + 1;
            else
            {
                ans = mid;
                high = mid - 1;
            }
        }
        return ans;
    }
    public static ArrayList<Long> build(int node,int start,int end,long[] pre)
    {
        if(start == end)
        {
            ArrayList<Long> arr = new ArrayList<>();
            arr.add(pre[start]);
            segment[node] = arr;
            //System.out.println(arr.get(0));
            return arr;
        }
        int mid = (start + end)/2;
        ArrayList<Long> left = build(2*node+1,start,mid,pre);
        ArrayList<Long> right = build(2*node+2,mid+1,end,pre);
        ArrayList<Long> merge = merge(left,right);
        segment[node] = merge;
        //for(int i=0;i<merge.size();i++)
          //  System.out.print(merge.get(i) + " ");
        //System.out.println();
        return merge;
    }
    public static long query(int node,int start,int end,int l,int r,long k)
    {
        if(r < start || l > end)
            return 0;
        else if(l <= start && r >= end)
        {
            long t = segment[node].size() - binary(segment[node],k);
            return t;
        }
        int mid = (start + end)/2;
        long left = query(2*node+1,start,mid,l,r,k);
        long right = query(2*node+2,mid+1,end,l,r,k);
        return (left + right);
    }
    public static void main(String[] args) throws  IOException
    {
        InputReader in = new InputReader(System.in);
        PrintWriter out = new PrintWriter(System.out);
        int n = in.nextInt();
        long t = in.nextLong();
        long[] arr = new long[n+1];
        for(int i=0;i<n;i++)
            arr[i] = in.nextLong();
        long[] pre = new long[n+1];
        for(int i=0;i<n;i++)
        {
            if(i == 0)
                pre[i] = arr[i];
            else
                pre[i] = pre[i-1] + arr[i];
        }
        build(0,0,n-1,pre);
        long count = 0;
        for(int i=0;i<n;i++)
        {
            if(pre[i] < t)
                count++;
            count = count + query(0,0,n-1,0,i-1,pre[i]-t);
        }
        out.println(count);
        out.close();
    }
}
