#include <bits/stdc++.h>
constexpr int N = 600005;
constexpr long long inf = 1e18;
using namespace std;
int n;
priority_queue<long long> q;
long long f1[N], f2[N], sum[N], low[N], up[N], d[N];
long long cal(int L, int R, long long k) {
  long long ans = 0;
  for (int i = L; i <= R; ++i) ans += min(d[i], k);
  return ans;
}
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; ++i) scanf("%lld", &d[i]);
  sort(d + 1, d + 1 + n);
  reverse(d + 1, d + 1 + n);
  for (int i = 1; i <= n; ++i) sum[i] = sum[i - 1] + d[i];
  d[0] = n;
  d[n + 1] = 0;
  for (int i = 0; i <= n; ++i) up[i] = inf, low[i] = -inf;
  long long tmp = 0;
  for (long long i = n; i >= 0; --i) {
    while (!q.empty() && q.top() > i) tmp -= q.top(), q.pop();
    f2[i] = tmp + 1ll * (n - i - q.size()) * i;
    if (d[i] <= i) q.push(d[i]), tmp += d[i];
    f1[i] = tmp + 1ll * (n - i + 1 - q.size()) * i;
  }
  for (long long i = n; i >= 0; --i) {
    if (i != n) {
      up[i] = min(up[i + 1], 1ll * i * (i + 1) + f1[i + 1] - sum[i]);
    } else
      up[i] = 1ll * i * (i + 1) - sum[i];
  }
  for (int i = 1; i <= n; ++i) {
    low[i] = max(low[i - 1], sum[i] - 1ll * i * (i - 1) - f2[i]);
  }
  for (int i = 0; i <= n; ++i)
    low[i] = max(low[i], d[i + 1]), up[i] = min(up[i], d[i]);
  long long L = inf, R = -inf;
  for (long long i = 0; i <= n; ++i)
    if (low[i] <= up[i]) L = min(L, low[i]), R = max(R, up[i]);
  if (L > R) printf("-1");
  for (long long i = L; i <= R; ++i)
    if (!((sum[n] - i) & 1)) printf("%lld ", i);
  puts("");
  return 0;
}
