#codefestival2016finald. [codefestival_2016_final_d]Pair Cards

[codefestival_2016_final_d]Pair Cards

题意:

已知高桥君有 nn 张卡片,每一张卡牌上有一个整数 xix_i。高桥君想要以以下两种条件合并两张卡牌:

11:两张卡牌上的整数相等。

22:两张卡牌上的整数之和是 mm 的倍数。

求出高桥君可以组成多少组的组数最大值。

注:一张卡牌不能在多组中使用。


输入格式:

第一行两个整数 nnmm

接下来一行,有 nn 个整数:x1x_1x2...xnx_2...x_n


输出格式:

输出组数的最大值。


数据范围与约定:

2n1052\le n \le 10^51m1051\le m \le 10^51xi1051 \le x_i \le 10^5