#include <bits/stdc++.h>
using namespace std;
const int MAXN = 5e5 + 5;
const long long inf = (1LL << 60);
long long n, a[MAXN], v1[MAXN], v2[MAXN], v3[MAXN], msuff[MAXN], r, part[MAXN];
vector<long long> ans;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> n;
  for (int i = 0; i < n; ++i) {
    cin >> a[i];
    r += a[i];
  }
  sort(a, a + n);
  reverse(a, a + n);
  set<pair<int, int> > s;
  for (int i = 0; i < n; ++i) s.insert(pair<int, int>(a[i], i));
  long long sum = 0;
  long long tot = 0;
  for (long long i = 0; i <= n; ++i) {
    while (true) {
      if (s.empty()) break;
      pair<int, int> t = (*s.begin());
      if (t.first < i) {
        s.erase(t);
        sum += t.first;
      } else {
        break;
      }
    }
    v1[i] = tot - i * (i - 1) - sum - i * s.size();
    v2[i] = v1[i] - i;
    tot += a[i];
    pair<int, int> t = (*s.lower_bound(pair<int, int>(a[i], i)));
    if (t == pair<int, int>(a[i], i))
      s.erase(t);
    else
      sum -= a[i];
  }
  s.clear();
  for (int i = 0; i < n; ++i) s.insert(pair<int, int>(a[i], i));
  sum = 0;
  tot = 0;
  for (long long i = 0; i <= n; ++i) {
    while (true) {
      if (s.empty()) break;
      pair<int, int> t = (*s.begin());
      if (t.first < i + 1) {
        s.erase(t);
        sum += t.first;
      } else {
        break;
      }
    }
    v3[i] = tot - (i + 1) * i - sum - (i + 1) * s.size();
    tot += a[i];
    pair<int, int> t = (*s.lower_bound(pair<int, int>(a[i], i)));
    if (t == pair<int, int>(a[i], i))
      s.erase(t);
    else
      sum -= a[i];
  }
  for (int k = 0; k <= n; ++k) {
    if (v1[k] > k) {
      cout << "-1\n";
      return 0;
    }
    long long t;
    if (k == 0)
      t = v1[k] - 1;
    else
      t = min(a[k - 1], v1[k] - 1);
    if (t >= 0) {
      part[0]++;
      part[t + 1]--;
    }
  }
  for (int k = 0; k <= n; ++k) {
    long long t = max(a[k], -v3[k] + 1);
    t = min(n + 1, t);
    part[t]++;
    part[n + 1]--;
  }
  long long ct = 0;
  for (int i = 1; i <= n; ++i) part[i] += part[i - 1];
  for (int i = 0; i <= n; ++i)
    if (part[i] == 0 && i % 2 == r % 2) {
      cout << i << ' ';
      ct++;
    }
  if (ct == 0) cout << "-1";
  cout << endl;
}
