#include <bits/stdc++.h>
using namespace std;
template <class T>
using VV = vector<vector<T>>;
template <class T>
inline T SMIN(T& a, const T b) {
  return a = (a > b) ? b : a;
}
template <class T>
inline T SMAX(T& a, const T b) {
  return a = (a < b) ? b : a;
}
template <class Iter>
void dumpc(Iter begin, Iter end) {
  if (false) {
    for (; begin != end; ++begin) {
      cerr << *begin << ',';
    }
    cerr << endl;
  }
}
const int MAX_N = 1e6 + 1;
long long A[MAX_N];
int N;
int f(int v) {
  if (v < 0) return -1;
  if (v > N) return 1;
  int M = N + 1;
  vector<int> cnt(M + 1, 0);
  vector<int> D(A, A + N);
  D.push_back(v);
  sort(D.rbegin(), D.rend());
  vector<long long> cum(M + 1, 0);
  for (int i = 0; i < (M); ++i) cum[i + 1] = cum[i] + D[i];
  long long len = 0, sum = 0;
  for (int k = M; k >= 1; --k) {
    len += cnt[k];
    sum -= 1LL * k * cnt[k];
    long long r = (long long)k * (k - 1) + sum + k * len;
    long long l = cum[k] - cum[0];
    if (l > r) {
      int res = D[k - 1] <= v ? 1 : -1;
      if (false) {
        cerr << "v"
             << " = " << (v) << ", "
             << "k"
             << " = " << (k) << ", "
             << "res"
             << " = " << (res) << endl;
      };
      return res;
    }
    if (D[k - 1] >= k)
      ++len;
    else
      sum += D[k - 1];
    cnt[D[k - 1]]++;
  }
  if (false) {
    cerr << "v"
         << " = " << (v) << ", "
         << "0"
         << " = " << (0) << endl;
  };
  return 0;
}
void solve() {
  sort(A, A + N);
  reverse(A, A + N);
  int p = 0;
  for (int i = 0; i < (N); ++i) p ^= (A[i] % 2);
  int good = -1, bad = (N + 2) / 2;
  while (abs(good - bad) > 1) {
    int m = (good + bad) / 2;
    (f(2 * m + p) < 0 ? good : bad) = m;
  }
  int l = good + 1;
  good = (N + 2) / 2, bad = -1;
  while (abs(good - bad) > 1) {
    int m = (good + bad) / 2;
    (f(2 * m + p) > 0 ? good : bad) = m;
  }
  int r = good - 1;
  if (false) {
    cerr << "l"
         << " = " << (l) << ", "
         << "r"
         << " = " << (r) << endl;
  };
  if (r - l < 0) {
    fprintf(stdout, "%d", -1), putchar('\n');
    ;
  } else {
    for (int i = (l); i <= (r); ++i) printf("%d ", 2 * i + p);
    fprintf(stdout, ""), putchar('\n');
    ;
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout << setprecision(12) << fixed;
  cin >> N;
  for (int i = 0; i < (N); ++i) cin >> A[i];
  solve();
  return 0;
}
