#include <bits/stdc++.h>
using namespace std;
int n;
struct segtree {
  vector<long long> t;
  vector<long long> d;
  int n, h;
  segtree() {}
  segtree(int sz) {
    h = 32 - __builtin_clz(sz);
    n = 1 << h;
    d = vector<long long>(n << 1, 0);
    t = vector<long long>(n << 1, 0);
  }
  inline void apply(int x, long long v) {
    t[x] += v;
    d[x] += v;
  }
  inline void pulll(int x) { t[x] = max(t[x << 1], t[x << 1 | 1]) + d[x]; }
  inline void pushh(int x) {
    if (d[x]) {
      apply(x << 1, d[x]);
      apply(x << 1 | 1, d[x]);
      d[x] = 0;
    }
  }
  inline void push(int i) {
    for (int l = h; l > 0; --l) {
      pushh(i >> l);
    }
  }
  void build() {
    for (int i = n - 1; i > 0; --i) {
      pulll(i);
    }
  }
  void apply(int l, int r, long long x) {
    bool cl = 0, cr = 0;
    l += n, r += n;
    push(l);
    push(r);
    for (; l < r; l /= 2, r /= 2) {
      if (cl) pulll(l - 1);
      if (cr) pulll(r);
      if (l % 2) {
        apply(l++, x);
        cl = 1;
      }
      if (r % 2) {
        apply(--r, x);
        cr = 1;
      }
    }
    for (l--; r > 0; l /= 2, r /= 2) {
      if (cl) pulll(l);
      if (cr && (!cl || l != r)) pulll(r);
    }
  }
  long long query(int l, int r) {
    long long ans = -1;
    l += n;
    r += n;
    push(l);
    push(r);
    for (; l < r; l /= 2, r /= 2) {
      if (l % 2) ans = max(ans, t[l++]);
      if (r % 2) ans = max(ans, t[--r]);
    }
    return ans;
  }
};
const int NMAX = 500500;
vector<int> d;
segtree st(NMAX);
int at[NMAX];
int main() {
  ios_base::sync_with_stdio(0), cin.tie(0);
  cin >> n;
  d = vector<int>(n + 1, 0);
  long long sum = 0;
  for (int i = 1; i <= n; ++i) {
    cin >> d[i];
    sum += d[i];
  }
  sort(d.begin() + 1, d.end());
  reverse(d.begin() + 1, d.end());
  long long pfx = 0;
  for (int i = 1; i <= n; ++i) {
    pfx += d[i];
    st.apply(i, i + 1, pfx - (long long)i * (i - 1));
    if (d[i] < i) {
      st.apply(d[i], i, -d[i]);
    }
    at[min(d[i], i)]++;
  }
  long long cur = n - at[0];
  for (int i = 1; i <= n; ++i) {
    cur -= at[i];
    st.apply(i, i + 1, -cur * i);
  }
  vector<int> ans;
  for (int i = 0; i <= n; ++i) {
    if (i != 0) {
      if (d[i] == 0) break;
      st.apply(i, n + 1, -1);
      st.apply(d[i], i, 1);
    }
    if (st.query(1, n + 1) <= 0 && (sum + i) % 2 == 0) {
      ans.push_back(i);
    }
  }
  if (ans.size() == 0) {
    cout << -1 << endl;
    return 0;
  }
  for (auto& x : ans) {
    cout << x << " ";
  }
  cout << endl;
  return 0;
}
