#include <bits/stdc++.h>
using namespace std;
class segTree {
  int n;
  vector<long long> st;

 public:
  segTree(int n) {
    this->n = n;
    st.resize(4 * n + 2);
    for (auto &i : st) i = -LONG_LONG_MAX;
  }
  void _update(int idx, long long val, int l, int r, int pos) {
    if (l == r) {
      st[pos] = val;
      return;
    }
    int lc = pos << 1, rc = lc ^ 1, mid = (l + r) >> 1;
    if (idx <= mid)
      _update(idx, val, l, mid, lc);
    else
      _update(idx, val, mid + 1, r, rc);
    st[pos] = max(st[lc], st[rc]);
  }
  long long _query(int ql, int qr, int l, int r, int pos) {
    if (qr < l || ql > r)
      return -LONG_LONG_MAX;
    else if (ql <= l && qr >= r)
      return st[pos];
    int lc = pos << 1, rc = lc ^ 1, mid = (l + r) >> 1;
    return max(_query(ql, qr, l, mid, lc), _query(ql, qr, mid + 1, r, rc));
  }
  void update(int idx, long long val) { _update(idx, val, 1, n, 1); }
  long long query(int ql, int qr) { return _query(ql, qr, 1, n, 1); }
};
int my_upper_bound(int *arr, int l, int r, int val) {
  int lef = l, rig = r, mid, idx = r + 1;
  while (lef <= rig) {
    mid = (lef + rig) >> 1;
    if (arr[mid] < val)
      idx = mid, rig = mid - 1;
    else
      lef = mid + 1;
  }
  return idx;
}
const int N = 5e5 + 7;
int n, a[N];
long long lef[N], rig[N], rig1[N], suff[N], total, rig2[N];
bool check(int x, segTree &S1, segTree &S2, segTree &S3) {
  if (total % 2 != x % 2) return 0;
  int idx = my_upper_bound(a, 1, n, x);
  if (idx != n + 1 && S2.query(idx, n + 1) + x > 0) return 0;
  if (idx != 1) {
    int j = min(x, idx - 1);
    if (j > 0 && S3.query(1, j) > 0) return 0;
    if (j + 1 <= idx - 1 && S1.query(j + 1, idx - 1) > x) return 0;
  }
  long long pref = lef[idx - 1] + x, other = idx * 1LL * (idx - 1);
  if (idx != n + 1) {
    int j = my_upper_bound(a, idx, n, idx);
    other += (suff[j] + 1LL * (j - idx) * idx);
  }
  return pref <= other;
}
int32_t main() {
  ios_base::sync_with_stdio(0), cin.tie(0);
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
    total += a[i];
  }
  sort(a + 1, a + n + 1);
  reverse(a + 1, a + n + 1);
  for (int i = n; i >= 1; i--) suff[i] = suff[i + 1] + a[i];
  for (int i = 1; i <= n; i++) {
    lef[i] = lef[i - 1] + a[i];
    rig[i] = 1LL * i * (i - 1);
    rig1[i] = 1LL * i * (i + 1);
    int j = my_upper_bound(a, i + 1, n, i);
    int j1 = my_upper_bound(a, i + 1, n, i + 1);
    rig[i] += (suff[j] + (j - 1 - i) * 1LL * i);
    rig1[i] += (suff[j1] + (j1 - 1 - i) * 1LL * (i + 1));
    rig2[i] = rig[i] + i;
  }
  segTree S1(n), S2(n), S3(n);
  for (int i = 1; i <= n; i++) {
    S1.update(i, lef[i] - rig[i]);
    S2.update(i, lef[i] - rig1[i]);
    S3.update(i, lef[i] - rig2[i]);
  }
  int ctr = 0;
  for (int i = 0; i <= n; i++) {
    if (check(i, S1, S2, S3)) {
      cout << i << " ";
      ctr++;
    }
  }
  if (!ctr) cout << "-1";
  cout << "\n";
}
