#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int n, mx = LLONG_MIN, sum = 0;
  cin >> n;
  std::vector<long long int> v(n);
  for (int i = 0; i < n; i++) {
    cin >> v[i];
    sum += v[i];
    mx = max(v[i], mx);
  }
  sum -= mx;
  sum > mx ? cout << "0\n" : cout << (mx - sum) + 1 << endl;
}
