#include <bits/stdc++.h>
using namespace std;
int main() {
  long n, num, mx = 0, sum = 0;
  cin >> n;
  for (int i = 1; i <= n; ++i) {
    cin >> num;
    mx = max(mx, num);
    sum += num;
  }
  if (sum - mx > mx)
    cout << 0;
  else
    cout << 2 * mx - sum + 1;
  return 0;
}
