#include <bits/stdc++.h>
using namespace std;
const int infi = 1e9 + 7;
const long long infl = (long long)1e18 + (long long)7;
long long tree[1100500];
long long add[1100500];
void upd(int i, int tl, int tr, int l, int r, int d) {
  if (l > r) return;
  if (tl == l && tr == r) {
    add[i] += d;
    return;
  }
  int mid = (tl + tr) >> 1;
  upd(i * 2, tl, mid, l, min(r, mid), d);
  upd(i * 2 + 1, mid + 1, tr, max(mid + 1, l), r, d);
  tree[i] = max(tree[i * 2] + add[i * 2], tree[i * 2 + 1] + add[i * 2 + 1]);
  return;
}
int ar[500500];
long long pr[500500];
long long get_sum(int l, int r) {
  if (l) return pr[r] - pr[l - 1];
  return pr[r];
}
long long p_max[500500];
long long s_max1[500500];
long long s_max2[500500];
long long get_sum(int l, int r, long long k) {
  if (l >= r) return 0;
  int i = lower_bound(ar + l, ar + r, k) - ar;
  long long ans = get_sum(l, i - 1);
  ans += max(0LL, (r - i) * k);
  return ans;
}
int32_t main() {
  cin.sync_with_stdio(false);
  cin.tie(0);
  int n;
  cin >> n;
  for (int i = 0; i < (n); ++i) cin >> ar[i];
  sort(ar, ar + n);
  for (int i = 0; i < (n); ++i) {
    pr[i] = ar[i];
    if (i) pr[i] += pr[i - 1];
  }
  for (int k = 1; k <= n; ++k) {
    long long sum = get_sum(n - k, n - 1);
    s_max1[n - k] = sum - 1LL * k * (k - 1) - get_sum(0, n - k, k) - k;
    s_max2[n - k] = s_max1[n - k] + k;
    sum -= 1LL * k * (k + 1);
    sum -= get_sum(0, n - k, k + 1);
    p_max[n - k] = sum;
  }
  for (int i = (1); i < (n); ++i) p_max[i] = max(p_max[i], p_max[i - 1]);
  for (int i = n - 2; i >= 0; --i) {
    s_max1[i] = max(s_max1[i], s_max1[i + 1]);
    s_max2[i] = max(s_max2[i], s_max2[i + 1]);
  }
  vector<int> ans;
  long long S = get_sum(0, n - 1);
  for (int a = 0; a <= n; ++a) {
    if ((S + a) % 2) continue;
    int i = lower_bound(ar, ar + n, a) - ar;
    if (i) {
      long long q = p_max[i - 1] + a;
      if (q > 0) continue;
    }
    if (i != n) {
      int j = max(n - a, i);
      if (j != n) {
        if (s_max1[j] > 0) continue;
      }
      long long q = s_max2[i] - a;
      if (q > 0) continue;
    }
    long long sum = get_sum(i, n - 1) + a;
    long long k = n - i + 1;
    sum -= k * (k - 1);
    sum -= get_sum(0, i, k);
    if (sum > 0) continue;
    ans.emplace_back(a);
  }
  if (ans.empty()) ans.emplace_back(-1);
  for (int a : ans) cout << a << ' ';
  return 0;
}
