func_code_string: #include <bits/stdc++.h>   using namespace std;   int32_t main() {     long long int n;     cin >> n;     long long int ar[n + 1];     for (long long int i = 0; i < n; i++) cin >> ar[i];     sort(ar, ar + n, greater<long long int>());     vector<long long int> v, ans;     for (long long int i = 0; i < n; i++) {       v.push_back(ar[i]);     }     ans.push_back(v[0]);     for (long long int i = 1; i < v.size(); i++) {       long long int p = v[i];       while (p >= 0) {         if (find(ans.begin(), ans.end(), p) != ans.end()) {           p--;         } else {           ans.push_back(p);           break;         }       }     }     long long int cnt = 0;     for (long long int i = 0; i < ans.size(); i++) cnt += ans[i];     cout << cnt << endl;   }   