#include <bits/stdc++.h>
using namespace std;
int a[100005];
int main() {
  int n;
  scanf("%d", &n);
  long long sum = 0;
  for (int i = 1; i < n + 1; i++) {
    scanf("%d", &a[i]);
    sum += a[i];
  }
  long long ans = 0;
  for (int i = 1; i <= n; i++) {
    long long x = sum - a[i];
    if (x <= a[i]) {
      ans = max(ans, a[i] - x + 1);
    }
  }
  cout << ans << " ";
  return 0;
}
