#include <bits/stdc++.h>
using namespace std;
long long inline read() {
  long long num = 0, neg = 1;
  char c = getchar();
  while (!isdigit(c)) {
    if (c == '-') neg = -1;
    c = getchar();
  }
  while (isdigit(c)) {
    num = (num << 3) + (num << 1) + c - '0';
    c = getchar();
  }
  return num * neg;
}
const long long maxn = 500010;
long long n, a[maxn], b[maxn], s[maxn], suf[maxn], cnt;
bool cmp(long long x, long long y) { return x > y; }
long long check(long long x) {
  long long N = n + 1;
  for (long long i = 1; i <= n; i++) b[i] = a[i];
  for (long long i = 1; i <= N; i++)
    if (x >= b[i]) {
      for (long long j = N; j >= i + 1; j--) b[j] = b[j - 1];
      b[i] = x;
      break;
    }
  for (long long i = 1; i <= N; i++) s[i] = s[i - 1] + b[i];
  for (long long i = N; i >= 1; i--) suf[i] = suf[i + 1] + b[i];
  if (s[N] > N * (N - 1)) return 0;
  b[N + 1] = -1;
  for (long long i = N - 1; i >= 1; i--) {
    long long l = i + 1, r = N + 1;
    while (l < r) {
      long long mid = l + r >> 1;
      if (b[mid] <= i)
        r = mid;
      else
        l = mid + 1;
    }
    if (s[i] > i * (i - 1) + suf[l] + (l - i - 1) * i) return x < b[i] ? 0 : 2;
  }
  return 1;
}
signed main() {
  n = read();
  long long sum = 0;
  for (long long i = 1; i <= n; i++)
    a[i] = read(), sum += a[i], cnt += (a[i] == n);
  sort(a + 1, a + n + 1, cmp);
  long long l = 0, r = n / 2;
  while (l < r) {
    long long mid = l + r >> 1;
    if (check(mid * 2 + (sum & 1)) >= 1)
      r = mid;
    else
      l = mid + 1;
  }
  long long L, R;
  L = max((cnt + !(sum & 1)) / 2, l);
  l = 0, r = n / 2;
  while (l < r) {
    long long mid = l + r + 1 >> 1;
    if (check(mid * 2 + (sum & 1)) <= 1)
      l = mid;
    else
      r = mid - 1;
  }
  R = l;
  if (L <= R)
    for (long long i = L; i <= R; i++) cout << i * 2 + (sum & 1) << " ";
  else
    cout << -1;
  return 0;
}
