//SHUBHAM RANA says hello #include #define sp " " #define br "\n" using namespace std; typedef long long int ll; typedef set::iterator si; typedef map::iterator mi; const ll MOD=1000000007; const ll INF=LLONG_MAX; const double MU=0.000001; const double PI=3.14159265359; bool compare(const ll &a,const ll &b) { return a>b; } int main() { ios_base::sync_with_stdio(false); cin.tie(0); //freopen("input.txt","r",stdin); //freopen("output.txt","w",stdout); ll n; cin>>n; ll a[n]; for(ll i=0;i>a[i]; } sort(a,a+n,compare); ll res=0; for(ll i=0;i