#include <bits/stdc++.h>
using namespace std;
inline void proc_status() {
  ifstream t("/proc/self/status");
  cerr << string(istreambuf_iterator<char>(t), istreambuf_iterator<char>())
       << endl;
}
template <typename T>
inline bool chkmin(T &a, const T &b) {
  return a > b ? a = b, 1 : 0;
}
template <typename T>
inline bool chkmax(T &a, const T &b) {
  return a < b ? a = b, 1 : 0;
}
template <typename T>
inline T read() {
  register T sum(0), fg(1);
  register char ch(getchar());
  for (; !isdigit(ch); ch = getchar())
    if (ch == '-') fg = -1;
  for (; isdigit(ch); ch = getchar()) sum = sum * 10 - '0' + ch;
  return sum * fg;
}
const long long MAXN = (long long)5e5;
const long long MAX_NODE = MAXN * 4;
struct SEGT {
  long long mx[MAX_NODE + 5];
  inline void push_up(long long u) { mx[u] = max(mx[u << 1], mx[u << 1 | 1]); }
  inline void build(long long u, long long l, long long r, long long *val) {
    if (l == r) {
      mx[u] = val[l];
      return;
    }
    long long mid = (l + r) >> 1;
    build(u << 1, l, mid, val);
    build(u << 1 | 1, mid + 1, r, val);
    push_up(u);
  }
  inline long long query(long long u, long long l, long long r, long long ql,
                         long long qr) {
    if (ql > qr) return LLONG_MIN / 2;
    if (ql <= l && r <= qr) return mx[u];
    long long mid = (l + r) >> 1;
    long long res = LLONG_MIN / 2;
    if (ql <= mid) chkmax(res, query(u << 1, l, mid, ql, qr));
    if (mid < qr) chkmax(res, query(u << 1 | 1, mid + 1, r, ql, qr));
    return res;
  }
};
struct BIT {
  long long N, c[MAXN + 5];
  inline void add(long long p, long long val) {
    for (++p; p <= N; p += p & -p) c[p] += val;
  }
  inline long long prefix(long long p) {
    long long res = 0;
    for (++p; p; p -= p & -p) res += c[p];
    return res;
  }
  BIT(long long _N) : N(_N + 1) {}
};
long long n;
long long d[MAXN + 5];
inline void input() {
  n = read<long long>();
  for (long long i = 1; i <= n; ++i) d[i] = read<long long>();
}
SEGT A, B, C;
long long val[MAXN + 5], prefix[MAXN + 5], suffix[MAXN + 5];
inline void solve() {
  sort(d + 1, d + n + 1, greater<long long>());
  for (long long i = 1; i <= n; ++i) prefix[i] = prefix[i - 1] + d[i];
  static BIT t(n);
  for (long long i = n; i >= 1; --i) {
    suffix[i] = suffix[i + 1] + min(d[i], i);
    t.add(d[i], +1);
    suffix[i] -= n - i + 1 - t.prefix(i - 1);
  }
  for (long long i = 1; i <= n; ++i) t.add(d[i], -1);
  for (long long i = 1; i <= n; ++i)
    val[i] = prefix[i] - (long long)i * (i - 1) - suffix[i + 1];
  A.build(1, 1, n, val);
  for (long long i = 1; i <= n; ++i) val[i] -= i;
  B.build(1, 1, n, val);
  for (long long i = n; i >= 1; --i) {
    suffix[i] = suffix[i + 1] + min(d[i], i + 1);
    t.add(d[i], +1);
    suffix[i] -= n - i + 1 - t.prefix(i);
  }
  for (long long i = 1; i <= n; ++i)
    val[i] = prefix[i] - (long long)(i + 1) * i - suffix[i + 1];
  C.build(1, 1, n, val);
  bool fg = 0;
  for (long long i = 0; i <= n; ++i)
    if ((prefix[n] + i) % 2 == 0) {
      long long p = lower_bound(d + 1, d + n + 1, i, greater<long long>()) - d;
      if (prefix[p - 1] + i - p * (p - 1) - suffix[p] > 0) continue;
      if (max(B.query(1, 1, n, 1, min(i, p - 1)),
              A.query(1, 1, n, min(i, p - 1) + 1, p - 1) - i) > 0)
        continue;
      if (C.query(1, 1, n, p, n) + i > 0) continue;
      printf("%lld ", i), fg = 1;
    }
  puts(fg ? "" : "-1");
}
int main() {
  input();
  solve();
  return 0;
}
