#include using namespace std; #include using namespace atcoder; using ll=long long; using Graph=vector>; #define INF 1000000000000000000 #define MOD 998244353 #define MAX 500 int main(){ int N; ll M; cin>>N>>M; map m; for(int i=0;i>A; m[A%M]++; } ll ans=0; for(auto p:m){ if(2*p.first==M&&p.second>0){ ans++; }else{ if(p.second>=m[M-p.first]){ ans+=p.second; m[M-p.first]=0; } } } cout<