#include <bits/stdc++.h>
using namespace std;
const int N = 500005;
int a[N], b[N], n, s;
long long pre[N];
int calc(int val, int n) {
  for (int i = (1); i <= (n); i++) a[i] = b[i];
  int p = ++n;
  a[p] = val;
  while (p >= 2 && a[p] > a[p - 1]) swap(a[p], a[p - 1]), p--;
  for (int i = (1); i <= (n); i++) pre[i] = pre[i - 1] + a[i];
  int cur = n + 1;
  long long ss;
  for (int i = (1); i <= (n); i++) {
    while (i + 1 < cur && a[cur - 1] <= i) --cur;
    while (cur <= i) ++cur;
    ss = 1ll * i * (i - 1) + pre[n] - pre[cur - 1] + 1ll * (cur - i - 1) * i;
    if (ss < pre[i]) {
      if (p <= i) return 1;
      return -1;
    }
  }
  return 0;
}
int getL(int n, int s) {
  int l = 0, r = (n >> 1) + 1, mid;
  while (l < r) {
    mid = (l + r) >> 1;
    if (calc(mid << 1 | s, n) >= 0)
      r = mid;
    else
      l = mid + 1;
  }
  return l;
}
int getR(int n, int s) {
  int l = -1, r = n >> 1, mid;
  while (l < r) {
    mid = (l + r + 1) >> 1;
    if (calc(mid << 1 | s, n) <= 0)
      l = mid;
    else
      r = mid - 1;
  }
  return l;
}
int main() {
  cin >> n;
  for (int i = (1); i <= (n); i++) cin >> b[i], s ^= b[i];
  s &= 1;
  sort(b + 1, b + n + 1, greater<int>());
  int L = getL(n, s);
  int R = getR(n, s);
  int flag = 0;
  for (int i = (L); i <= (R); i++) {
    flag = 1;
    cout << (i << 1 | s) << " ";
  }
  if (!flag) puts("-1");
  return 0;
}
