#include <bits/stdc++.h>
using namespace std;
const int inf = 0x3f3f3f3f;
const int MOD = 1e9 + 7;
int a[100005];
int main() {
  int n;
  cin >> n;
  long long sum = 0;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
    sum += a[i];
  }
  sort(a + 1, a + 1 + n);
  sum -= a[n];
  long long ans = 0;
  if (sum > a[n])
    ans = 0;
  else
    ans = a[n] - sum + 1;
  cout << ans << endl;
  return 0;
}
