#include <bits/stdc++.h>
using namespace std;
const long long maxn = 500005;
long long n;
long long sum;
multiset<long long> a;
long long pre[maxn];
long long suf[maxn];
vector<long long> all;
void pre_cal() {
  pre[0] = all[0];
  for (long long i = 1; i < all.size(); i++) pre[i] = pre[i - 1] + all[i];
  suf[n + 1] = 0;
  for (long long i = all.size() - 1; i >= 0; i--) suf[i] = suf[i + 1] + all[i];
}
long long check(long long x) {
  if (x > n || x < 0) return 3;
  all.clear();
  a.insert(x);
  for (auto tmp : a) all.push_back(tmp);
  a.erase(a.find(x));
  reverse(all.begin(), all.end());
  pre_cal();
  long long tmp = all.size() - 1;
  while (tmp > 0 && all[tmp] == 0) tmp--;
  for (long long i = 0; i < all.size(); i++) {
    long long left = pre[i];
    long long right = i * (i + 1) + suf[max(tmp + 1, i + 1)] +
                      max((tmp - i), 0LL) * (i + 1LL);
    if (left <= right)
      ;
    else {
      if (all[i] <= x)
        return 2;
      else
        return 1;
    }
    while (tmp > 0 && all[tmp] < i + 2) tmp--;
  }
  return 0;
}
long long binary1() {
  long long left = 0;
  long long right = (sum - n) % 2 == 0 ? n : n - 1;
  while (left < right) {
    long long mid = left + (right - left) / 2;
    int res = check(mid);
    if (res == 2)
      right = mid - 1;
    else if (res == 1)
      left = mid + 1;
    else
      right = mid;
  }
  return left;
}
long long binary2() {
  long long left = 0;
  long long right = (sum - n) % 2 == 0 ? n : n - 1;
  while (left < right) {
    long long mid = left + (right - left + 1) / 2;
    int res = check(mid);
    if (res == 2)
      right = mid - 1;
    else if (res == 1)
      left = mid + 1;
    else
      left = mid;
  }
  return right;
}
int main() {
  scanf("%I64d", &n);
  for (long long i = 0; i < n; i++) {
    long long x;
    scanf("%I64d", &x);
    a.insert(x);
    sum += x;
  }
  long long end = binary2();
  if ((end - sum) % 2 != 0) end--;
  if (check(end) != 0) {
    cout << -1 << endl;
    return 0;
  }
  long long start = binary1();
  if ((start - sum) % 2 != 0) start++;
  for (long long i = start; i <= end; i += 2) {
    printf("%I64d ", i);
  }
  cout << endl;
}
