#include using namespace std; #define int long long signed main(){ int N,M; cin>>N>>M; vector S(N); map s; for(int i=0;i>S[i]; S[i] %= M; if(!s.count(S[i])) s[S[i]] = 0; s[S[i]]++; } int ans = 0; for(auto x:s){ int a = x.first; int b = x.second; if(a == 0 && s.count(0)) ans++; else if(!s.count(M-a)) ans += b; else if(a == M-a) ans += b; else if(a < M-a) ans += max(S[M-a],b); } cout<