#include using namespace std; int main(){ ios::sync_with_stdio(false); cin.tie(nullptr); long long N,M; cin>>N>>M; mapcnt; for(int i=0;i>A; cnt[A%M]+=1; cnt[(M-A%M)%M]+=0; } int ans=0; for(auto i:cnt){ if(i.first>M/2)continue; if(i.first*2==M||i.first==0){ ans+=min(1,i.second); }else{ ans+=max(i.second,cnt[M-i.first]); } } cout<