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 Ishu
{
    static Scanner scan = new Scanner(System.in);
    static BufferedWriter output = new BufferedWriter(new OutputStreamWriter(System.out)); 
    static void build(int[] tree, int[] a, int beg, int end, int pos)
    {
    if(beg == end)
        {
        tree[pos] = a[beg];
        return;
        }
      
    int mid = (beg + end) / 2;  
    build(tree, a, beg, mid, 2 * pos);
    build(tree, a, mid + 1, end, 2 * pos + 1);
    tree[pos] = tree[2 * pos] + tree[2 * pos + 1]; 
    }
    static void update(int[] tree, int beg, int end, int idx, int pos)
    {
    if(beg == end && beg == idx)
        {
        tree[pos]--;
        return;
        }
    int mid = (beg + end) / 2;   
    if(idx <= mid)
        update(tree, beg, mid, idx, 2 * pos);
    else
        update(tree, mid + 1, end, idx, 2 * pos + 1);  
        
    tree[pos] = tree[2 * pos] + tree[2 * pos + 1];    
    }
    static int query(int[] tree, int beg, int end, int l, int r, int pos)
    {
    if(r < beg || l > end)
        return 0;
    else if(l <= beg && end <= r)
        return tree[pos];
    
    int mid = (beg + end) / 2;
    int left = query(tree, beg, mid, l, r, 2 * pos);
    int right = query(tree, mid + 1, end, l, r, 2 * pos + 1);
    return left + right;
    }
    static int lower_bound(long[] a, int n, long data)
    {
    int beg = 0;
    int end = n - 1;
    int mid = (beg + end) / 2;
    while(beg <= end)
        {
        mid = (beg + end) / 2;
        if(a[mid] == data)
            return mid;
        else if(a[mid] > data)   
            end = mid - 1;
        else
            beg = mid + 1;
        }
      
    return end;    
    }
    static void tc() throws Exception
    {
    int n = scan.nextInt();
    long t = scan.nextLong();
    int i;
    int[] a = new int[n + 1];
    long[] pre = new long[n + 1];
    Set<Long> set = new HashSet<Long>();
    Map<Long, Integer> map = new HashMap<Long, Integer>();
    //pre[0] = Long.MIN_VALUE;
    pre[0] = 0;
    set.add(pre[0]);
    map.put(pre[0], 1);
    for(i=1;i<=n;++i)
        {
        a[i] = scan.nextInt();
        if(i == 1)
            pre[i] = a[i];
        else
            pre[i] = a[i] + pre[i-1];
            
        set.add(pre[i]);
        if(!map.containsKey(pre[i]))
            map.put(pre[i], 0);
        int value = map.get(pre[i]);
        ++value;
        map.remove(pre[i]);
        map.put(pre[i], value);
        }
     
    List<Long> list = new ArrayList<Long>(set);
    int m = list.size();
    long[] b = new long[m];
    for(i=0;i<m;++i)  
        b[i] = list.get(i);
    Arrays.sort(b, 0, m);
        
    int[] cnt = new int[m];
    for(i=0;i<m;++i)
        cnt[i] = map.get(b[i]);
    
    int[] tree = new int[4 * m];    
    build(tree, cnt, 0, m - 1, 1); 
    
    int ctr = n + 1; 
    long ans = 0l;
    
    for(i=n;i>=1;--i)    
        {
        --ctr;
        int idx = Arrays.binarySearch(b, pre[i]);
        --cnt[idx];
        update(tree, 0, m - 1, idx, 1);
        
        long cps = pre[i];
        long rps = cps - t;

        idx = lower_bound(b, m, rps);
        long qa = 0;
        if(idx < 0)
            qa = 0;
        else   
            qa = query(tree, 0, m - 1, 0, idx, 1);
          
        long ra = ctr - qa;
        ans += ra;
        }
        
    output.write(ans + "\n");
    output.flush();
    }
    public static void main(String[] args) throws Exception
    {
    int t = 1;
    //t = scan.nextInt();
    while(t-- > 0)
        tc();
    }
}
