Target Sum Pairs


Submit solution

Points: 10
Time limit: 2.0s
Memory limit: 256M

Author:
Problem types

Target Sum Pairs

Count unordered index pairs (i, j) with i < j and aᵢ + aⱼ equal to a target value x.

Input

The first line contains n and x (1 ≤ n ≤ 200000, |x| ≤ 10^9). The second line contains n integers |aᵢ| ≤ 10^9.

Output

Print the number of valid index pairs.

Example 1

Input

6 7
1 6 3 4 3 4

Output

5

Example 2

Input

5 0
-2 2 0 0 2

Output

3


Comments

There are no comments at the moment.