#include <bits/stdc++.h>
using namespace std;
const long long INF = (long long)1e18;
const int N = 1 << 20;
long long mins[2 * N];
long long tags[2 * N];
void push(int i) {
  if (tags[i] != 0) {
    mins[i] += tags[i];
    if (i < N) {
      tags[2 * i] += tags[i];
      tags[2 * i + 1] += tags[i];
    }
    tags[i] = 0;
  }
}
void add(int a, int b, long long v, int i = 1, int ia = 0, int ib = N - 1) {
  push(i);
  if (b < ia || ib < a) return;
  if (a <= ia && ib <= b) {
    tags[i] += v;
    push(i);
  } else {
    int mid = (ia + ib) >> 1;
    add(a, b, v, 2 * i, ia, mid);
    add(a, b, v, 2 * i + 1, mid + 1, ib);
    mins[i] = min(mins[2 * i], mins[2 * i + 1]);
  }
}
long long get(int a, int b, int i = 1, int ia = 0, int ib = N - 1) {
  push(i);
  if (b < ia || ib < a) return INF;
  if (a <= ia && ib <= b) return mins[i];
  int mid = (ia + ib) >> 1;
  long long res = INF;
  res = min(res, get(a, b, 2 * i, ia, mid));
  res = min(res, get(a, b, 2 * i + 1, mid + 1, ib));
  return res;
}
int bins(const vector<long long>& vals, long long v) {
  int low = 0;
  int high = vals.size();
  while (low != high) {
    int mid = (low + high) >> 1;
    if (vals[mid] <= v)
      high = mid;
    else
      low = mid + 1;
  }
  return low;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  int n;
  cin >> n;
  int parity = 0;
  vector<long long> ds(n);
  for (int i = 0; i < n; ++i) {
    cin >> ds[i];
    parity ^= ds[i] % 2;
  }
  for (int i = 0; i < n; ++i) ds[i] *= -1;
  sort(ds.begin(), ds.end());
  for (int i = 0; i < n; ++i) ds[i] *= -1;
  vector<long long> ss(n + 1, 0);
  for (int i = n - 1; i >= 0; --i) ss[i] = ss[i + 1] + ds[i];
  vector<long long> ps(n, 0);
  ps[0] = ds[0];
  for (int i = 1; i < n; ++i) ps[i] = ps[i - 1] + ds[i];
  for (int i = 0; i < n; ++i) {
    int ind = bins(ds, i + 1);
    int inte = max(i + 1, ind);
    long long lst = (long long)(i + 1) * (inte - (i + 1)) + ss[inte];
    long long val = (long long)i * (i + 1) - ps[i] + lst;
    add(i, i, val);
  }
  vector<int> perm;
  for (int i = 0; i < n;) {
    int j = i + 1;
    for (; j < n; ++j) {
      if (ds[j] != ds[i]) break;
    }
    for (int z = j - 1; z >= i; --z) perm.push_back(z);
    i = j;
  }
  vector<int> res;
  if ((get(0, n - 1) >= 0) && (parity == 0)) res.push_back(0);
  for (int j = 0; j < n; ++j) {
    int i = perm[j];
    if (ds[i] == 0) break;
    parity ^= 1;
    add(i, n - 1, 1);
    add(ds[i] - 1, i - 1, -1);
    if ((get(0, n - 1) >= 0) && (parity == 0)) res.push_back(j + 1);
  }
  if (res.empty()) {
    cout << "-1\n";
  } else {
    for (auto it : res) cout << it << ' ';
    cout << '\n';
  }
}
