Question
Count Pairs with Sum at Most X

You are given a sorted array of N positive integers and an integer X. Count pairs (i,j) with i<j and A_i+A_j<=X.

Input

The first line contains KaTeX can only parse string typed expression and KaTeX can only parse string typed expression. The second line contains KaTeX can only parse string typed expression integers in non-decreasing order.

Output

Print the number of valid pairs.

Example
Example:
Input
5 7

1 2 3 5 6
Output
5

Online