#include <bits/stdc++.h>
using namespace std;
const long long mod = 1000000007;
const int N = 501010;
int n;
int a[N];
void init() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    scanf("%d", a + i);
  }
}
void build() {}
long long sum = 0;
int val[N];
int p;
int go(int ll, int rr) {
  int an = -1;
  p = n + 1;
  while (ll <= rr) {
    int mid = (ll + rr) >> 1;
    a[p] = val[mid];
    while (p + 1 <= n + 1 && a[p] < a[p + 1]) {
      swap(a[p], a[p + 1]);
      p++;
    }
    while (p - 1 >= 1 && a[p] > a[p - 1]) {
      swap(a[p], a[p - 1]);
      p--;
    }
    long long lsum = 0, rsum = 0, num = n + 1;
    int pos = n + 1;
    int gg = -1;
    for (int i = 1; i <= n + 1; i++) {
      lsum += a[i];
      if (i - 1 < a[i]) {
        num--;
      } else {
        rsum -= a[i];
      }
      while (pos > i && a[pos] <= i) {
        rsum += a[pos];
        num--;
        pos--;
      }
      if (lsum > i * 1ll * (i - 1) + rsum + num * i) {
        gg = i;
        break;
      }
    }
    if (gg == -1) {
      an = val[mid], rr = mid - 1;
    } else if (p <= gg) {
      rr = mid - 1;
    } else {
      ll = mid + 1;
    }
  }
  return an;
}
int gogo(int ll, int rr) {
  int an = -1;
  while (ll <= rr) {
    int mid = (ll + rr) >> 1;
    a[p] = val[mid];
    while (p + 1 <= n + 1 && a[p] < a[p + 1]) {
      swap(a[p], a[p + 1]);
      p++;
    }
    while (p - 1 >= 1 && a[p] > a[p - 1]) {
      swap(a[p], a[p - 1]);
      p--;
    }
    long long lsum = 0, rsum = 0, num = n + 1;
    int pos = n + 1;
    int gg = -1;
    for (int i = 1; i <= n + 1; i++) {
      lsum += a[i];
      if (i - 1 < a[i]) {
        num--;
      } else {
        rsum -= a[i];
      }
      while (pos > i && a[pos] <= i) {
        rsum += a[pos];
        num--;
        pos--;
      }
      int ck1 = 0, ck2 = 0;
      for (int j = i + 1; j <= n + 1; j++) {
        if (a[j] > i)
          ck1++;
        else
          ck2 += a[j];
      }
      if (lsum > i * 1ll * (i - 1) + rsum + num * i) {
        gg = i;
        break;
      }
    }
    if (gg == -1) {
      an = val[mid], ll = mid + 1;
    } else if (p <= gg) {
      rr = mid - 1;
    } else {
      ll = mid + 1;
    }
  }
  return an;
}
void solve() {
  sort(a + 1, a + n + 1, greater<int>());
  for (int i = 1; i <= n; i++) {
    sum += a[i];
  }
  int l = 0, r = -1;
  int st = 0;
  if (sum % 2) st = 1;
  while (st <= n) {
    r++;
    val[r] = st;
    st += 2;
  }
  int ll = go(l, r);
  int rr = gogo(l, r);
  if (ll == -1) {
    puts("-1");
  } else {
    for (int i = ll; i <= rr; i += 2) {
      printf("%d%c", i, " \n"[i == rr]);
    }
  }
}
int main() {
  init();
  build();
  solve();
  return 0;
}
