A ticket office keeps its list of n fares sorted in non-decreasing order. You are given a target amount T. Count how many index pairs (i, j) with i < j have fare[i] + fare[j] == T. Pairs are counted by index, so two tickets that happen to share the same fare value still count as separate pairs.
Input format
Line 1: two integers n and T.
Line 2: n space-separated integers, sorted in non-decreasing order — the fares.
Output format
A single integer: the number of index pairs (i, j), i < j, with fare[i] + fare[j] == T.
Constraints
- 2 ≤ n ≤ 100000
- -1000000 ≤ T, fare[i] ≤ 1000000
- The fare array is sorted in non-decreasing order.