func_code_string: #include <bits/stdc++.h>   using namespace std;   int main() {     int n, A[100005];     cin >> n;     for (int i = 0; i < n; i++) cin >> A[i];     int mx = 0;     long long sum = 0;     for (int i = 0; i < n; i++) {       sum += A[i];       if (A[i] > mx) mx = A[i];     }     sum -= mx;     if (sum <= mx) {       cout << mx - sum + 1 << endl;     } else {       cout << 0;     }     return 0;   }   