#include<iostream>
#include<vector>
#include<numeric>
#include<set>

int main() {
    using namespace std;
    ios_base::sync_with_stdio(false);

    int N;
    cin >> N;

    vector vec(N, 0);
    for(auto & v: vec) 
    {
        cin >> v;
    }

    set sortList(vec.begin(), vec.end());

    cout << N/2 * std::accumulate(vec.begin(), vec.end(), 0) + 1 + max(*sortList.end()-N, 0);
}