#include <bits/stdc++.h>
using namespace std;
inline int in() {
  int x;
  scanf("%d", &x);
  return x;
}
template <typename T>
inline istream& operator>>(istream& i, vector<T>& v) {
  for (int j = 0; j < ((int)(v).size()); ++j) i >> v[j];
  return i;
}
template <typename T>
string join(const vector<T>& v) {
  stringstream s;
  for (int i = 0; i < ((int)(v).size()); ++i) s << ' ' << v[i];
  return s.str().substr(1);
}
template <typename T>
inline ostream& operator<<(ostream& o, const vector<T>& v) {
  if ((int)(v).size()) o << join(v);
  return o;
}
template <typename T1, typename T2>
inline istream& operator>>(istream& i, pair<T1, T2>& v) {
  return i >> v.first >> v.second;
}
template <typename T1, typename T2>
inline ostream& operator<<(ostream& o, const pair<T1, T2>& v) {
  return o << v.first << "," << v.second;
}
template <typename T>
inline long long int suma(const vector<T>& a) {
  long long int res(0);
  for (auto&& x : a) res += x;
  return res;
}
const double eps = 1e-10;
const long long int LINF = 1001002003004005006ll;
const int INF = 1001001001;
const int MX = 200005;
int o;
long long int c2(long long int n) { return n * (n - 1); }
int fl(vector<int>& a) {
  int n = (int)(a).size() + 1;
  long long int sm = suma(a);
  int mx = n / 2 + 2;
  int l = -1, r = mx;
  while (l + 1 < r) {
    int c = (l + r) / 2;
    int x = c * 2 + o;
    bool ok = true;
    if (sm <= c2(n)) {
      vector<int> d = a;
      d.push_back(x);
      sort(d.begin(), d.end());
      reverse(d.begin(), d.end());
      long long int s = sm, t = 0, k = 0;
      long long int nx = x;
      stack<int> q;
      for (int i = (n)-1; i >= 0; --i) {
        if (d[i] == nx) {
          nx = LINF;
        } else {
          s -= d[i];
        }
        t += d[i];
        q.push(d[i]);
        while ((int)(q).size() && q.top() > i) {
          t -= q.top();
          ++k;
          q.pop();
        }
        if (s > c2(i) + t + k * i) ok = false;
      }
    } else
      ok = false;
    if (ok)
      r = c;
    else
      l = c;
  }
  return r * 2 + o;
}
int fr(vector<int>& a) {
  int n = (int)(a).size() + 1;
  long long int sm = suma(a);
  int mx = n / 2 + 2;
  int l = -1, r = mx;
  while (l + 1 < r) {
    int c = (l + r) / 2;
    int x = c * 2 + o;
    bool ok = true;
    if (sm + x <= c2(n)) {
      vector<int> d = a;
      d.push_back(x);
      sort(d.begin(), d.end());
      reverse(d.begin(), d.end());
      long long int s = sm + x, t = 0, k = 0;
      long long int nx = x;
      stack<int> q;
      for (int i = (n)-1; i >= 0; --i) {
        s -= d[i];
        if (d[i] == nx) {
          nx = LINF;
          ++k;
        } else {
          t += d[i];
          q.push(d[i]);
        }
        while ((int)(q).size() && q.top() > i) {
          t -= q.top();
          ++k;
          q.pop();
        }
        if (s > c2(i) + t + k * i) ok = false;
      }
    } else
      ok = false;
    if (ok)
      l = c;
    else
      r = c;
  }
  return l * 2 + o;
}
int main() {
  int n;
  scanf("%d", &n);
  vector<int> a(n);
  cin >> a;
  sort(a.begin(), a.end());
  o = suma(a) & 1;
  int l = fl(a);
  int r = fr(a);
  vector<int> ans;
  for (int i = l; i <= r; i += 2) ans.push_back(i);
  if ((int)(ans).size() == 0) ans.push_back(-1);
  cout << ans << endl;
  return 0;
}
