#include <bits/stdc++.h>
using namespace std;
long long n;
long long a[500011], pmin[500011], psum[500011];
long long Erdos_Gallai(long long val) {
  vector<long long> v;
  v.push_back(1e9);
  bool pushed = 0;
  for (long long i = 1; i <= n; i++) {
    if (!pushed && a[i] < val) {
      pushed = 1;
      v.push_back(val);
    }
    v.push_back(a[i]);
    pmin[i] = 1e9;
    psum[i] = 0;
  }
  if (!pushed) v.push_back(val);
  psum[n + 1] = psum[n + 2] = 0;
  for (long long i = 1; i <= n + 1; i++) psum[i] = psum[i - 1] + v[i];
  pmin[n + 1] = pmin[n + 2] = 1e9;
  for (long long i = n + 1; i >= 1; i--) pmin[i] = min(pmin[i + 1], v[i]);
  long long ptr = n + 1;
  long long cur = 0, cnt = 0;
  for (long long i = 1; i <= n; i++) {
    cur += v[i];
    for (;;) {
      if (v[ptr] <= i && ptr > i)
        ptr--;
      else
        break;
    }
    if (ptr < i) ptr = i;
    long long S = (ptr - i) * i + psum[n + 1] - psum[ptr] + i * (i - 1);
    if (cur > S) cnt++;
  }
  return cnt;
}
int32_t main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cin >> n;
  long long odd = 0;
  for (long long i = 1; i <= n; i++) {
    cin >> a[i];
    odd += a[i];
  }
  sort(a + 1, a + n + 1, greater<long long>());
  long long L = 0, R = n;
  long long pos = n + 1;
  while (R - L >= 3) {
    long long m1 = L + (R - L) / 3, m2 = R - (R - L) / 3;
    long long cur_1 = Erdos_Gallai(m1), cur_2 = Erdos_Gallai(m2);
    if (cur_1 == 0) {
      pos = m1;
      break;
    }
    if (cur_2 == 0) {
      pos = m2;
      break;
    }
    if (cur_1 < cur_2) {
      R = m2;
    } else {
      L = m1;
    }
  }
  if (pos == n + 1) {
    for (long long i = L; i <= R; i++) {
      long long tmp = Erdos_Gallai(i);
      if (tmp == 0) {
        pos = i;
        break;
      }
    }
  }
  L = 0, R = pos;
  while (L <= R) {
    long long M = (L + R) / 2;
    long long cur = Erdos_Gallai(M);
    if (cur > 0)
      L = M + 1;
    else
      R = M - 1;
  }
  long long d1 = L;
  L = pos, R = n + 1;
  while (L <= R) {
    long long M = (L + R) / 2;
    long long cur = Erdos_Gallai(M);
    if (cur > 0)
      R = M - 1;
    else
      L = M + 1;
  }
  long long d2 = R;
  long long cnt = 0;
  for (long long i = d1; i <= d2; i++) {
    if (i % 2 == odd % 2) {
      cout << i << " ";
      cnt++;
    }
  }
  if (cnt == 0) cout << -1;
  return 0;
}
