#include <bits/stdc++.h>
using namespace std;
const int MAXN = 100001;
int n;
long long h[MAXN], b, sum, ans;
int main() {
  while (~scanf("%d", &n)) {
    sum = 0;
    for (int i = 1; i <= n; ++i) {
      scanf("%lld", &h[i]);
      sum += h[i];
    }
    int flag = 0;
    for (int i = 1; i <= n; i++) {
      if (h[i] >= sum / 2) {
        flag = i;
        break;
      }
    }
    if (flag == 0)
      puts("0");
    else
      printf("%lld\n", h[flag] - (sum - h[flag]) + 1);
  }
  return 0;
}
