The Information and Communications Corps organizes a sports festival for the entire Corps with n participants, numbered from 1 to n, knowing who is the friendliness of the i-th person (1 ≤ i ≤ n). In the competition summary, the Organizing Committee organizes a festival for the members and organizes a competition that requires many participants, the participants in the game together must achieve a level of friendliness according to the requirements of the game. Knowing that any two people chosen in the team have the total friendliness of the two people divisible by a number k, they will compete with each other (lose friendliness).
Request: Please help the Organizing Committee choose the most people to participate in the game so that when any two people participate in the game, their total friendliness is NOT divisible by k.
Input: From the standard device has the following format:
- The first line contains 2 positive integers n and k (1 ≤ n ≤ ~10^5~, 1 ≤ k ≤ 100);
- The second line contains n positive integers ~a_1, a_2, …, a_n~. Where ~a_i~ is the friendliness of the i-th person ~(1 ≤ a_i ≤ 10^9, 1 ≤ i ≤ n)~, each number is separated by a space and the ai numbers are distinct.
Output: Write to the standard device a single positive number which is the maximum number of people selected to participate in the game such that the sum of the friendliness of any two selected people is not divisible by k.
Exam:
Input
4 5
5 2 6 3
Output
3
Explain
Choose 3 people with friendliness levels of 5, 2 and 6 respectively to satisfy the problem requirements.
Comments