#include <bits/stdc++.h>
using namespace std;
const int N = 5e5 + 10;
int n, a[N];
long long s2[N], s1[N], sum, mi, mx;
inline int read() {
  int x = 0, f = 1;
  char ch = getchar();
  while (ch < '0' || ch > '9') {
    if (ch == '-') f = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') {
    x = x * 10 + ch - '0';
    ch = getchar();
  }
  return x * f;
}
long long wk() {
  for (int i = n; i >= 1; i--) s1[i] = s1[i + 1] + a[i];
  for (int i = 1; i <= n; i++) s2[i] = s2[i - 1] + a[i];
  long long w = 0;
  sum = 0;
  for (int i = 1; i <= n; i++) sum += a[i];
  for (int i = n; i; i--) {
    int p = lower_bound(a + i + 1, a + n + 1, i, greater<int>()) - a;
    long long x = (long long)i * (i - 1) + (long long)(p - i - 1) * i + s1[p];
    if (s2[i] - x > i) {
      puts("-1");
      exit(0);
    }
    w = max(w, s2[i] - x);
  }
  if (sum & 1) {
    if (w & 1)
      ;
    else
      w++;
  } else {
    if (w & 1) w++;
  }
  return w;
}
int main() {
  n = read();
  for (int i = 1; i <= n; i++) a[i] = read();
  sort(a + 1, a + n + 1, greater<int>());
  mx = wk();
  reverse(a + 1, a + n + 1);
  for (int i = 1; i <= n; i++) a[i] = n - a[i];
  mi = n - wk();
  if (mx > mi) swap(mx, mi);
  for (long long i = min(mx, mi); i <= max(mx, mi) && i <= n; i += 2)
    printf("%I64d ", i);
  return 0;
}
