#include <bits/stdc++.h>
using namespace std;
long long s[610001], f0[610001], f1[610001], vr[610001], vl[610001], t1, t2;
int i, j, k, n, m, a[610001], q[610001];
bool cmp(int x, int y) { return x > y; }
int main() {
  scanf("%d", &n);
  for (i = 1; i <= n; i++) scanf("%d", &a[i]);
  sort(a + 1, a + 1 + n, cmp);
  for (s[0] = 0, i = 1; i <= n; i++) s[i] = s[i - 1] + a[i];
  f0[0] = 0;
  j = n;
  for (i = 1; i <= n; i++) {
    f0[i] = f0[i - 1] - min(i - 1, a[i]) + max(j - i, 0);
    for (; j > i && a[j] < i; j--) f0[i] -= i - a[j];
  }
  for (vl[0] = 0, i = 1; i <= n; i++) {
    t1 = s[i] - ((long long)i * (long long)(i - 1) + f0[i]);
    if (vl[i - 1] == -1 || t1 > i)
      vl[i] = -1;
    else
      vl[i] = max(vl[i - 1], t1);
  }
  for (j = n; j && !a[j]; j--)
    ;
  f1[0] = j;
  for (i = 1; i <= n; i++) {
    f1[i] = f1[i - 1] - min(i, a[i]) + max(j - i, 0);
    for (; j > i && a[j] < i + 1; j--) f1[i] -= i + 1 - a[j];
  }
  vr[n] = min((long long)(n + 1) * (long long)n - s[n], (long long)n);
  for (i = n - 1; i >= 0; i--) {
    t1 = (long long)i * (long long)(i + 1) + f1[i] - s[i];
    vr[i] = min(t1, vr[i + 1]);
  }
  for (i = n - (s[n] + n) % 2, j = 0; i >= 0; i -= 2) {
    for (; j < n && i < a[j + 1]; j++)
      ;
    if (vl[j] != -1 && vl[j] <= i && i <= vr[j]) q[++q[0]] = i;
  }
  if (!q[0])
    puts("-1");
  else {
    if (q[0] > 1) sort(q + 1, q + 1 + q[0]);
    for (i = 1; i <= q[0]; i++) printf("%d ", q[i]);
    puts("");
  }
  return 0;
}
