#include <bits/stdc++.h>
template <typename T, typename S>
inline bool upmin(T& a, const S& b) {
  return a > b ? a = b, 1 : 0;
}
template <typename T, typename S>
inline bool upmax(T& a, const S& b) {
  return a < b ? a = b, 1 : 0;
}
using namespace std;
const int dx[4] = {-1, 0, 1, 0};
const int dy[4] = {0, 1, 0, -1};
const int dxo[8] = {-1, -1, -1, 0, 1, 1, 1, 0};
const int dyo[8] = {-1, 0, 1, 1, 1, 0, -1, -1};
inline bool is_down(char x) { return ('a' <= x && x <= 'z'); }
inline bool is_upper(char x) { return ('A' <= x && x <= 'Z'); }
inline bool is_digit(char x) { return ('0' <= x && x <= '9'); }
inline int read() {
  int x = 0, f = 1;
  char ch = getchar();
  while (ch < '0' || ch > '9') {
    if (ch == '-') f = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') {
    x = 10 * x + ch - '0';
    ch = getchar();
  }
  return x * f;
}
inline long long readll() {
  long long x = 0, f = 1;
  char ch = getchar();
  while (ch < '0' || ch > '9') {
    if (ch == '-') f = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') {
    x = 10 * x + ch - '0';
    ch = getchar();
  }
  return x * f;
}
long long gcd(long long x, long long y) { return y ? gcd(y, x % y) : x; }
long long power(long long x, long long y) {
  long long t = 1;
  for (; y; y >>= 1, x = x * x % (1000000007))
    if (y & 1) t = t * x % (1000000007);
  return t;
}
int n, d[(500000 + 5)];
long long x[(500000 + 5)], y[(500000 + 5)];
int s[(500000 + 5)];
int sum(int x) {
  int ret = 0;
  x++;
  for (; x; x -= (x & (-x))) ret += s[x];
  return ret;
}
void add(int x, int y) {
  x++;
  for (; x <= n + 1; x += (x & (-x))) s[x] += y;
}
int main() {
  n = read();
  for (int i = 1; i <= n; i++) d[i] = read();
  n++;
  sort(d + 1, d + n + 1);
  for (int i = 1; i <= n / 2; i++) swap(d[i], d[n + 1 - i]);
  for (int i = 1; i <= n; i++) x[i] = x[i - 1] + d[i];
  for (int i = n; i >= 1; i--) {
    y[i] = y[i + 1] + min(d[i + 1], i) - (sum(n) - sum(i));
    add(d[i + 1], 1);
  }
  for (int i = 1; i <= n; i++) y[i] += (long long)i * (i - 1);
  long long l = 0, r = n - 1;
  for (int i = 1; i <= n; i++) {
    if (x[i] > y[i]) l = max(l, x[i] - y[i]);
    r = min(r, y[i] + min(d[i], i) - x[i] + d[i]);
  }
  long long tmp = 0;
  for (int i = 1; i <= n; i++) tmp += d[i];
  if (l % 2 != tmp % 2) l++;
  if (r % 2 != tmp % 2) r--;
  if (l > r)
    cout << -1 << endl;
  else
    for (int i = l; i <= r; i += 2) printf("%d ", i);
  cout << endl;
  return 0;
}
