#include <bits/stdc++.h>
using namespace std;
const long long N = 1e6 + 500;
const long long M = 1e6 + 500;
const long long INF = 0x3f3f3f3f;
const long long MOD = 1e9 + 7;
const long long LOG = 20;
const long long OFF = (1 << LOG);
const double PI = 3.1415926535;
const double EPS = 1e-9;
long long gran1[N], gran2[N], n, a[N], par, pref[N];
long long sum = 0, sum2 = 0;
long long get(long long l, long long r) {
  if (l > r) return 0;
  return pref[r] - (l ? pref[l - 1] : 0);
}
long long binary(long long x, long long k) {
  long long ret = -1;
  for (long long l = 18; l >= 0; l--) {
    if (x + ret + (1 << l) >= n) continue;
    if (a[x + ret + (1 << l)] >= k) ret += (1 << l);
  }
  return x + ret + 1;
}
int main() {
  for (long long i = 0; i < N; i++) {
    gran1[i] = 0, gran2[i] = INF * INF;
  }
  scanf("%d", &n);
  for (long long i = 0; i < n; i++) {
    scanf("%d", a + i);
    pref[i] = a[i];
    sum += a[i];
    par = (par + a[i]) % 2;
  }
  pref[n] = pref[n - 1];
  sort(a, a + n);
  reverse(a, a + n);
  for (long long i = 0; i < n; i++) {
    pref[i] = a[i];
    if (i) pref[i] += pref[i - 1];
  }
  long long j = n - 1;
  for (long long k = n; k >= 1; k--) {
    long long sum1 = get(0, k - 1);
    long long poz = binary(k, k);
    long long sum2 = (poz - k) * k + get(poz, n - 1);
    gran1[a[k - 1]] = max(sum1 - k * (k - 1) - sum2, gran1[a[k - 1]]);
    gran2[a[k - 1]] = min((long long)k * (k - 1) - (sum1 - a[k - 1]) + sum2 +
                              min(a[k - 1], (long long)k),
                          (long long)gran2[a[k - 1]]);
  }
  for (long long i = 1; i <= n; i++) {
    gran2[i] = min(gran2[i], gran2[i - 1]);
  }
  for (long long i = n - 1; i >= 0; i--) {
    gran1[i] = max(gran1[i], gran1[i + 1]);
  }
  long long cnt = 0;
  for (int i = 0; i <= n; i++) {
    if (i % 2 == par && gran1[i] <= i && i <= gran2[i]) printf("%d ", i), cnt++;
  }
  if (cnt == 0) printf("-1");
  printf("\n");
  return 0;
}
