Crane Pairs

Problem

A warehouse has n boxes in a row. Box i weighs w_i grams. A crane can lift exactly two boxes at once, and it only works when the two weights add up to exactly T grams.

Count the pairs of positions i < j whose weights add up to T. Two boxes with the same weight at different positions count as different boxes.

Input

The first line has two integers n and T. The second line has n integers w_1 ... w_n.

Output

Print one integer: the number of pairs i < j with w_i + w_j = T.

Constraints

  • 1 ≤ n ≤ 150000
  • 1 ≤ wi ≤ 109
  • 2 ≤ T ≤ 2 * 109
  • The answer can be larger than 32 bits.

Notes

In the first example the box of weight 3 and the box of weight 7 add up to 10. The three boxes of weight 5 also pair up with each other, since 5 + 5 = 10, and three boxes give three pairs. That is 1 + 3 = 4.