#include <bits/stdc++.h>
using namespace std;
const int MAXN = 500100;
int N;
int deg[MAXN];
long long ps[MAXN];
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(NULL);
  cin >> N;
  for (int i = 0; i < N; i++) cin >> deg[i];
  sort(deg, deg + N);
  reverse(deg, deg + N);
  ps[0] = 0;
  for (int i = 0; i < N; i++) ps[i + 1] = ps[i] + deg[i];
  int cloc = N;
  long long csum = 0;
  long long lo = 0, hi = N;
  for (int i = 1; i <= N; i++) {
    while (cloc < i) {
      csum -= deg[cloc];
      cloc++;
    }
    while (cloc > i && deg[cloc - 1] <= i) {
      csum += deg[cloc - 1];
      cloc--;
    }
    long long vscore =
        i + i * ((long long)i - 1) - ps[i] + csum + i * ((long long)cloc - i);
    lo = max(lo, i - vscore);
    hi = min(hi, cloc + vscore);
  }
  vector<int> ans;
  int r = ps[N] % 2;
  while (r <= N) {
    if (r >= lo && r <= hi) ans.push_back(r);
    r += 2;
  }
  if (!ans.size()) ans.push_back(-1);
  for (int i = 0; i < ans.size(); i++) {
    if (i) cout << " ";
    cout << ans[i];
  }
  cout << "\n";
}
