#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
const int N = 1e6 + 6;
const int inf = 1e18;
struct segt {
  vector<ll> t, ta;
  int d;
  segt(vector<ll> v) {
    for (d = 2; d < v.size(); d <<= 1)
      ;
    t.assign(d * 2, inf);
    ta.assign(d * 2, 0LL);
    for (int i = 0; i < v.size(); ++i) t[i + d] = v[i];
    for (int i = d - 1; i; --i) t[i] = min(t[i * 2], t[i * 2 + 1]);
  }
  void add(int i, int j, int x, int l, int r, int v) {
    if (i == l && j == r) {
      ta[v] += x;
      t[v] += x;
      return;
    }
    int m = (l + r) / 2;
    if (i <= m) add(i, min(j, m), x, l, m, v * 2);
    if (j > m) add(max(i, m + 1), j, x, m + 1, r, v * 2 + 1);
    t[v] = min(t[v * 2], t[v * 2 + 1]) + ta[v];
  }
  void add(int i, int j, int x) {
    if (i <= j) add(i, j, x, 0, d - 1, 1);
  }
  ll getmin() { return t[1]; }
};
void solve(int n, vector<int> d) {
  sort((d).begin(), (d).end());
  reverse((d).begin(), (d).end());
  d.push_back(0);
  vector<ll> w(n + 1);
  ll sum = 0;
  for (int i = 0; i <= n; ++i) {
    sum += d[i];
    w[i] = (i + 1LL) * i - sum;
  }
  vector<ll> ss = {0};
  for (int i = n; i >= 0; --i) ss.push_back(ss.back() + d[i]);
  for (int k = n; k >= 0; --k) {
    auto q = d.rbegin() + n - k;
    auto it = lower_bound(d.rbegin(), q, k + 1);
    ll cnt_more_eq = q - it;
    int h = it - d.rbegin();
    ll sum_less = ss[h];
    ll sm = cnt_more_eq * (k + 1) + sum_less;
    w[k] += sm;
  }
  segt t(w);
  vector<int> ans;
  for (int p = 0, i = n; p <= n; ++p) {
    if (sum % 2 == 0 && t.getmin() >= 0) ans.push_back(p);
    while (i > 0 && d[i - 1] == d[i]) --i;
    assert(d[i] == p);
    t.add(i, n, -1);
    t.add(max(0, d[i]), i - 1, +1);
    ++sum;
    ++d[i];
  }
  if (ans.empty())
    cout << -1 << endl;
  else {
    sort((ans).begin(), (ans).end());
    for (int x : ans) cout << x << ' ';
    cout << endl;
  }
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  int n, m;
  cin >> n;
  vector<int> a(n);
  for (int &x : a) cin >> x;
  solve(n, a);
  return 0;
}
