Time limit
2s
Memory limit
128 MB
Jumong is preparing armor for an iron army. Each material has a distinct identifier.
One piece of armor can be made from two materials. If the sum of the two identifiers is M, those two materials can be used to make one piece of armor.
Given N material identifiers and the target value M, determine how many pieces of armor can be made.
The first line contains the number of materials N. (1 <= N <= 15,000)
The second line contains the required identifier sum M. (1 <= M <= 10,000,000)
The third line contains N material identifiers separated by spaces. Each identifier is a natural number at most 100,000.
Print the number of pieces of armor that can be made.