#include <bits/stdc++.h>
using namespace std;
int n, v[500005], v2[500005];
bool OK(int x, int t) {
  bool A = 0, B = 0;
  long long s = 0, s2 = 0, px;
  for (int i = 1; i <= n; i++) v[i] = v2[i];
  v[n + 1] = x;
  px = n + 1;
  for (int i = n; v[i] < x; i--) {
    v[i + 1] = v[i];
    v[i] = x;
    px = i;
  }
  for (int i = 1; i <= n + 1; i++) s += v[i];
  int pos = 0;
  for (int k = n + 1; k >= 2; k--) {
    s -= v[k];
    s2 += min(k - 1, v[k]);
    if (v[k] > k - 1 && !pos) pos = k;
    while (pos && pos < n + 1 && v[pos + 1] > k - 1) pos++;
    if (pos) s2 -= (pos - k);
    if (s > 1LL * (k - 1) * (k - 2) + s2) {
      if (px >= k)
        A = 1;
      else
        B = 1;
    }
  }
  if (A && B) {
    cout << -1;
    exit(0);
  }
  if (A) return 0;
  if (B) return 1;
  return !t;
}
bool comp(int a, int b) { return a > b; }
int main() {
  ios::sync_with_stdio(false);
  long long par = 0;
  cin >> n;
  for (int i = 1; i <= n; i++) cin >> v[i], par += v[i];
  sort(v + 1, v + n + 1, comp);
  for (int i = 1; i <= n; i++) v2[i] = v[i];
  par %= 2;
  int p = 1, st = par, dr = par;
  for (; p <= 1e8; p <<= 1)
    ;
  for (; p >= 1; p >>= 1) {
    if (st + p * 2 <= n && !OK(st + p * 2, 0)) st += p * 2;
    if (dr + p * 2 <= n && !OK(dr + p * 2, 1)) dr += p * 2;
  }
  if (!OK(st, 0)) st += 2;
  for (int i = st; i <= dr; i += 2) cout << i << ' ';
  if (dr < st) cout << -1 << '\n';
  return 0;
}
