#include<iostream>
#include<vector>
#include<numeric>
#include<algorithm>

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;
    }

    int maxN = *std::max_element(vec.begin(), vec.end());

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