#include #include using namespace std; map ms,ms2; int main() { int n; cin>>n; for(int i=0;i>a; ms[a]++; ms2[a]++; } map::iterator it,it2; for(map::iterator it=ms.begin();it!=ms.end();it++){ int s,c; s=(*it).first+1; it2=ms2.upper_bound(s); if(it2!=ms2.end()){ (*it2).second--; if((*it2).second<=0){ ms2.erase(it2); } n--; } } cout<