#include <bits/stdc++.h>
using namespace std;
const int MaxN = 500100;
const int Mod = 1e9 + 7;
int N;
long long a[MaxN];
long long a_pref[MaxN];
int first_higher[MaxN];
long long par;
long long F[MaxN], G[MaxN];
long long F_pref[MaxN], G_suff[MaxN];
long long sum_a(long long L, long long R) {
  if (L > R) return 0;
  return (long long)a_pref[R] - a_pref[L - 1];
}
vector<long long> nums_in_segment(long long L, long long R) {
  vector<long long> ret;
  for (long long i = L; i <= R; i++) {
    if (abs(i) % 2 == par) ret.push_back(i);
  }
  return ret;
}
void solve() {
  vector<long long> sol;
  for (int r = (1); r < (N + 2); r++) {
    long long lo = max(F_pref[r - 1], (long long)a[r]);
    long long hi = G_suff[r];
    if (r >= 2) hi = min(hi, (long long)a[r - 1] - 1);
    vector<long long> nums = nums_in_segment(lo, hi);
    for (auto x : nums) sol.push_back(x);
  }
  sort(sol.begin(), sol.end());
  for (int i = 1; i < (int)sol.size(); i++) {
    assert(sol[i] > sol[i - 1]);
  }
  if (sol.empty()) {
    cout << -1 << endl;
    exit(0);
  }
  for (auto x : sol) cout << x << " ";
  cout << endl;
}
void prec() {
  for (int k = (1); k < (N + 2); k++) {
    F[k] += sum_a(1, k);
    F[k] -= (long long)k * (k - 1);
    F[k] -= sum_a(max(k + 1, first_higher[k] + 1), N);
    F[k] -= (long long)k * max(0, (first_higher[k] + 1 - (k + 1)));
  }
  for (int k = (1); k < (N + 2); k++) {
    G[k] = (long long)min(a[k], (long long)k) + a[k] - F[k];
  }
  for (int k = (1); k < (N + 2); k++) {
    if (F[k] > (long long)k) F[k] = 1e9;
  }
  for (int r = (1); r < (N + 2); r++) {
    if (r == 1)
      F_pref[r - 1] = 0;
    else
      F_pref[r - 1] = max(F_pref[r - 2], F[r - 1]);
  }
  for (int r = N + 1; r >= 1; r--) {
    if (r == N + 1)
      G_suff[r] = G[r];
    else
      G_suff[r] = min(G[r], G_suff[r + 1]);
  }
}
void load() {
  cin >> N;
  for (int i = (0); i < (N); i++) cin >> a[i + 1];
  for (int i = (0); i < (N); i++) a[i + 1] = -a[i + 1];
  sort(a + 1, a + 1 + N);
  for (int i = (0); i < (N); i++) a[i + 1] = -a[i + 1];
  a[0] = 0;
  a[N + 1] = 0;
  a[N + 2] = 0;
  a[N + 3] = 0;
  for (int i = (0); i < (N); i++) par += a[i + 1] % 2;
  par = par % 2;
  a_pref[0] = 0;
  for (int i = (0); i < (N + 2); i++) a_pref[i + 1] = a_pref[i] + a[i + 1];
  int i = 1;
  for (long long k = N + 2; k >= 1; k--) {
    while (k <= a[i] && i <= N) {
      i++;
    }
    first_higher[k] = i - 1;
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  load();
  prec();
  solve();
  return 0;
}
