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