#include <bits/stdc++.h>
using namespace std;
const long long maxn = 500009;
long long n;
long long num[maxn];
long long qz[maxn];
long long mx[maxn];
long long mi[maxn];
long long ls[maxn] = {0};
priority_queue<long long, vector<long long>, greater<long long> > pq;
int main() {
  scanf("%I64d", &n);
  long long a, b, c, i, j;
  for (a = 1; a <= n; a++) scanf("%I64d", &num[a]);
  sort(num + 1, num + n + 1);
  for (a = 1; a <= n; a++)
    if (a <= n + 1 - a) swap(num[a], num[n + 1 - a]);
  for (a = 1; a <= n; a++) qz[a] = qz[a - 1] + num[a];
  num[0] = n + 3;
  b = 0;
  for (a = n; a >= 0; a--) {
    while (b <= num[a] && b <= n + 1) {
      ls[b] = a;
      b++;
    }
  }
  for (a = 0; a <= n; a++) {
    mi[a] = qz[a] - a * (a - 1);
    b = a + 1;
    if (a < ls[a]) {
      mi[a] -= (ls[a] - a) * a;
      b = ls[a] + 1;
    }
    mi[a] -= (qz[n] - qz[b - 1]);
    if (mi[a] > a) mi[a] = n + 1;
  }
  for (a = 1; a <= n; a++) {
    mx[a] = a * (a + 1);
    b = (a + 1);
    if (a < ls[a + 1]) {
      mx[a] += (ls[a + 1] - a) * (a + 1);
      b = ls[a + 1] + 1;
    }
    mx[a] += (qz[n] - qz[b - 1]);
    mx[a] -= qz[a];
  }
  mx[0] = qz[n];
  for (a = 1; a <= n; a++) mi[a] = max(mi[a - 1], mi[a]);
  for (a = n - 1; a >= 0; a--) mx[a] = min(mx[a + 1], mx[a]);
  j = n;
  for (b = qz[n] % 2; b <= n; b += 2) {
    while (b > num[j]) j--;
    if (b <= mx[j] && b >= mi[j]) pq.push(b);
  }
  if (!pq.size()) {
    printf("-1\n");
  }
  while (pq.size()) {
    printf("%I64d ", pq.top());
    pq.pop();
  }
  return 0;
}
