#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using pii = pair<int, int>;
using pll = pair<ll, ll>;
using ld = long double;
const int mod = 1e9 + 7;
const ll inf = 1e6;
const ll INF = 2e18;
const int N = 2e6 + 66;
const int M = 5005;
const int BIG = -1;
const int SMALL = 0;
const int NICE = 1;
ll n, a[N], b[N];
int check(ll k) {
  ll m = n + 1;
  for (ll i = 1; i <= n; ++i) {
    b[i] = a[i];
  }
  b[m] = k;
  sort(b + 1, b + 1 + m);
  reverse(b + 1, b + 1 + m);
  ll id = -1;
  for (ll i = 1; i <= m; ++i) {
    if (b[i] == k) {
      id = i;
      break;
    }
  }
  ll suff = 0;
  ll sum = 0;
  int r = m + 1;
  for (ll i = 1; i < m; ++i) {
    sum += b[i];
    if (r <= i) suff -= b[i];
    while (r - 1 > i && b[r - 1] <= i) {
      suff += b[r - 1];
      r--;
    }
    ll cur = i * 1ll * (i - 1) + suff + max(0LL, r - i - 1) * 1LL * i;
    if (sum > cur) {
      if (id <= i)
        return BIG;
      else
        return SMALL;
    }
  }
  return NICE;
}
void solve() {
  cin >> n;
  int odd = 0;
  for (int i = 1; i <= n; ++i) {
    cin >> a[i];
    odd ^= a[i];
  }
  odd &= 1;
  ll l = 0, r = inf, Lans = -1;
  while (l <= r) {
    ll m = l + (r - l) / 2;
    if (m % 2 != odd) ++m;
    if (m < l || m > r) break;
    if (int pepe = check(m); pepe == NICE) {
      Lans = m;
      r = m - 1;
    } else if (pepe == BIG) {
      r = m - 1;
    } else if (pepe == SMALL) {
      l = m + 1;
    } else
      assert(0);
  }
  if (Lans == -1) {
    cout << -1;
    return;
  }
  l = 0, r = inf;
  ll Rans = -1;
  while (l <= r) {
    ll m = l + (r - l) / 2;
    if (m % 2 != odd) ++m;
    if (m < l || m > r) break;
    if (int pepe = check(m); pepe == NICE) {
      Rans = m;
      l = m + 1;
    } else if (pepe == BIG) {
      r = m - 1;
    } else if (pepe == SMALL) {
      l = m + 1;
    }
  }
  assert(Lans <= Rans);
  assert(Lans % 2 == Rans % 2);
  while (Lans <= Rans) {
    cout << Lans << " ";
    Lans += 2;
  }
}
int main() {
  ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  ;
  int tt = 1;
  while (tt--) {
    solve();
    cout << "\n";
  }
}
