#include <bits/stdc++.h>
using namespace std;
long long n, w, y, c[1000005], cc[1000005], b[1000005], h[1000005], yer,
    fen[1000005], fll, bulduk, bas, son;
void up(long long x, long long y) {
  for (; x <= n; x += x & -x) fen[x] += y;
}
long long qu(long long x) {
  long long top = 0;
  for (; x > 0; x -= x & -x) top += fen[x];
  return top;
}
long long bul(long long x) {
  long long bas = 1, son = n;
  while (bas < son) {
    if (c[((bas + son + 1) / 2)] >= x)
      bas = ((bas + son + 1) / 2);
    else
      son = ((bas + son + 1) / 2) - 1;
  }
  return ((bas + son + 1) / 2);
}
bool dene(long long x) {
  if (qu(n) % 2) return 0;
  w = n;
  for (long long i = son; i <= n; i++) {
    w = bul(i);
    if (x > 0 and c[w] < i) w--;
    y = max(i, w);
    if (qu(i) > i * (y - 1) + qu(n) - qu(y)) {
      son = i;
      return 0;
    }
  }
  return 1;
}
bool deneamk(long long x) {
  b[n] = x;
  for (long long i = 1; i <= n - 1; i++) b[i] = cc[i];
  sort(b + 1, b + n + 1);
  reverse(b + 1, b + n + 1);
  for (long long i = 1; i <= n; i++) h[i] = h[i - 1] + b[i];
  if (h[n] % 2) return 0;
  w = n;
  for (long long i = 1; i <= n; i++) {
    while (w > 0 and b[w] < i) w--;
    y = max(i, w);
    if (h[i] > i * (y - 1) + h[n] - h[y]) {
      return 0;
    }
  }
  return 1;
}
int main() {
  scanf("%lld", &n);
  n++;
  for (long long i = 1; i <= n - 1; i++) {
    scanf("%lld", c + i);
    cc[i] = c[i];
  }
  sort(c + 1, c + n);
  reverse(c + 1, c + n);
  yer = n;
  for (long long i = 1; i <= n; i++) up(i, c[i]);
  for (long long i = 0; i <= n - 1; i++) {
    if (dene(i)) {
      bulduk = i;
      fll = 1;
      break;
    }
    c[yer]++;
    up(yer, 1);
    if (yer > 1 and c[yer] > c[yer - 1]) {
      up(yer, -c[yer]);
      up(yer - 1, -c[yer - 1]);
      swap(c[yer], c[yer - 1]);
      up(yer, c[yer]);
      up(yer - 1, c[yer - 1]);
      yer--;
    }
  }
  if (!fll) {
    puts("-1");
    return 0;
  }
  bas = bulduk;
  son = n - 1;
  while (son - bas >= 2) {
    if (deneamk(((bas + son + 1) / 2)))
      bas = ((bas + son + 1) / 2);
    else if (deneamk(((bas + son + 1) / 2) + 1))
      bas = ((bas + son + 1) / 2) + 1;
    else
      son = ((bas + son + 1) / 2) - 1;
  }
  for (long long i = bulduk; i <= son; i += 2) printf("%lld ", i);
  return 0;
}
