#include <bits/stdc++.h>
template <typename T>
void MACRO_VAR_Scan(T& t) {
  std::cin >> t;
}
template <typename First, typename... Rest>
void MACRO_VAR_Scan(First& first, Rest&... rest) {
  std::cin >> first;
  MACRO_VAR_Scan(rest...);
}
template <typename T>
void MACRO_VEC_ROW_Init(int n, T& t) {
  t.resize(n);
}
template <typename First, typename... Rest>
void MACRO_VEC_ROW_Init(int n, First& first, Rest&... rest) {
  first.resize(n);
  MACRO_VEC_ROW_Init(n, rest...);
}
template <typename T>
void MACRO_VEC_ROW_Scan(int p, T& t) {
  std::cin >> t[p];
}
template <typename First, typename... Rest>
void MACRO_VEC_ROW_Scan(int p, First& first, Rest&... rest) {
  std::cin >> first[p];
  MACRO_VEC_ROW_Scan(p, rest...);
}
template <class T>
inline T CHMAX(T& a, const T b) {
  return a = (a < b) ? b : a;
}
template <class T>
inline T CHMIN(T& a, const T b) {
  return a = (a > b) ? b : a;
}
template <class T>
std::vector<std::vector<T>> VV(int n, int m, T init = T()) {
  return std::vector<std::vector<T>>(n, std::vector<T>(m, init));
}
template <typename S, typename T>
std::ostream& operator<<(std::ostream& os, std::pair<S, T> p) {
  os << "(" << p.first << ", " << p.second << ")";
  return os;
}
using ll = long long;
using ull = unsigned long long;
using ld = long double;
using PAIR = std::pair<int, int>;
using PAIRLL = std::pair<ll, ll>;
constexpr int INFINT = 1 << 30;
constexpr int INFINT_LIM = (1LL << 31) - 1;
constexpr ll INFLL = 1LL << 60;
constexpr ll INFLL_LIM = (1LL << 62) - 1 + (1LL << 62);
constexpr double EPS = 1e-10;
constexpr int MOD = 998244353;
constexpr double PI = 3.141592653589793238462643383279;
template <class T, size_t N>
void FILL(T (&a)[N], const T& val) {
  for (auto& x : a) x = val;
}
template <class ARY, size_t N, size_t M, class T>
void FILL(ARY (&a)[N][M], const T& val) {
  for (auto& b : a) FILL(b, val);
}
template <class T>
void FILL(std::vector<T>& a, const T& val) {
  for (auto& x : a) x = val;
}
template <class ARY, class T>
void FILL(std::vector<std::vector<ARY>>& a, const T& val) {
  for (auto& b : a) FILL(b, val);
}
signed main() {
  std::ios::sync_with_stdio(false);
  std::cin.tie(0);
  ;
  int n;
  MACRO_VAR_Scan(n);
  ;
  std::vector<int> a(n);
  for (auto& i : a) std::cin >> i;
  ;
  std::sort((a).begin(), (a).end());
  std::reverse((a).begin(), (a).end());
  int odd = 0;
  for (int i = 0; i < int(n); ++i) (odd += a[i]) %= 2;
  int any = -1;
  auto check = [&](int d) {
    any = -1;
    if (!(0 <= d && d < n + 1)) return false;
    std::vector<int> b;
    int p = -1;
    if (d > a.front()) {
      b.emplace_back(d);
      b.insert(b.end(), a.begin(), a.end());
      p = -1;
    } else {
      for (int i = 0; i < int(n); ++i) {
        if (i + 1 == n || (a[i] >= d && d > a[i + 1])) {
          b.insert(b.end(), a.begin(), a.begin() + i + 1);
          b.emplace_back(d);
          b.insert(b.end(), a.begin() + i + 1, a.end());
          p = i;
          break;
        }
      }
    }
    std::vector<ll> c(n + 2, 0);
    for (int i = 0; i < int(n + 1); ++i) c[i + 1] = c[i] + b[i];
    std::vector<ll> e(n + 1, 0);
    {
      int pos = n;
      for (int i = 0; i < int(n + 1); ++i) {
        int k = i + 1;
        while (i <= pos && k > b[pos]) --pos;
        if (pos < i) pos = i;
        e[i] = ll(pos - i) * k + (c[n + 1] - c[pos + 1]);
      }
    }
    for (int i = 0; i < int(n + 1); ++i) {
      ll k = i + 1;
      ll t = k * (k - 1) + e[i] - c[i + 1];
      if (t < 0) {
        if (p < i)
          return false;
        else
          return true;
      }
    }
    any = d;
    return true;
  };
  {
    int L = 0, R = n;
    check(L);
    if (any == -1) check(R);
    while (any == -1 && R - L > 1) {
      int M = (L + R) / 2;
      if (check(M))
        L = M;
      else
        R = M;
    }
    if (any == -1) {
      if (L % 2 != odd) ++L;
      for (int i = L - 30; i <= L + 30; i += 2) {
        check(i);
        if (any != -1) break;
      }
    }
  }
  if (any != -1 && any % 2 != odd) {
    int t = any;
    check(t - 1);
    if (any == -1) check(t + 1);
  }
  if (any == -1) {
    std::cout << (-1);
    std::cout << "\n";
    ;
    return 0;
  }
  const int ANY = any;
  int LL = -1, L = ANY, R = ANY, RR = n + 1;
  while (L - LL > 1) {
    int M = (LL + L) / 2;
    check(M);
    if (any == -1)
      LL = M;
    else
      L = M;
  }
  while (RR - R > 1) {
    int M = (RR + R) / 2;
    check(M);
    if (any == -1)
      RR = M;
    else
      R = M;
  }
  if (L % 2 != odd) ++L;
  if (R % 2 != odd) --R;
  if (L > R) {
    std::cout << (-1);
    std::cout << "\n";
    ;
    return 0;
  }
  for (int i = L; i <= R; i += 2) {
    std::cout << (i);
    std::cout << " ";
    ;
  }
  std::cout << "\n";
  ;
  return 0;
}
