#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long n, i, l, r, sum = 0, sum1 = 0, sum2 = 0;
  cin >> n;
  long long a[n + 2];
  for (i = 1; i <= n; i++) {
    cin >> a[i];
    sum += a[i];
  }
  sort(a + 1, a + 1 + n);
  l = 1;
  r = n;
  bool f = false;
  while (l < r) {
    sum1 += a[l];
    sum2 += a[r];
    if (sum1 + (sum - sum1 + sum2) > sum2) {
      break;
      f = true;
    }
  }
  if (!f)
    cout << 2 * a[n] - sum + 1 << endl;
  else
    cout << 0 << endl;
}
