#include <bits/stdc++.h>
using namespace std;
int a[500010], ulm[500010], llm[500010], k, n, r;
long long ca[500010];
map<int, int> idx;
bool possible(int r) {
  while ((k > 1) && (r >= a[k])) {
    k--;
  }
  return ((llm[k] <= r) && (r <= ulm[k]));
}
int get_upper_limit(long long i) {
  long long res = i * (i + 1) - ca[i], ul;
  auto it = idx.lower_bound(i + 1);
  if (it == idx.end()) {
    ul = i;
  } else {
    ul = max((long long)it->second, i);
  }
  res += (ca[n] - ca[ul] + (ul - i) * (i + 1));
  res = min(res, (long long)(n + 1));
  return res;
}
int get_lower_limit(long long i) {
  long long res = ca[i] - i * (i - 1), ul;
  auto it = idx.lower_bound(i);
  if (it == idx.end()) {
    ul = i;
  } else {
    ul = max((long long)it->second, i);
  }
  res -= (ca[n] - ca[ul] + (ul - i) * (i));
  if (res > i) {
    return n + 1;
  }
  res = max(res, 0LL);
  return res;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cin >> n;
  k = n;
  r = 0;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
    r = (r + a[i]) & 1;
  }
  sort(a + 1, a + n + 1, greater<int>());
  ca[0] = 0;
  a[n + 1] = 0;
  ulm[n + 1] = n + 1;
  llm[0] = 0;
  for (int i = 1; i <= n; i++) {
    ca[i] = ca[i - 1] + a[i];
    idx[a[i]] = i;
  }
  for (int i = 1; i <= n; i++) {
    llm[i] = max(get_lower_limit(i), llm[i - 1]);
  }
  for (int i = n; i >= 1; i--) {
    ulm[i] = min(get_upper_limit(i), ulm[i + 1]);
  }
  bool found = false;
  while (r <= n) {
    if (possible(r)) {
      printf("%d ", r);
      found = true;
    }
    r += 2;
  }
  if (!found) {
    printf("-1\n");
    return 0;
  }
  printf("\n");
  return 0;
}
