#include <bits/stdc++.h>
using namespace std;
const long long mod = 998244353;
const long long mod2 = 32416190039;
long double PI = acosl(-1);
const long long inf = 1e15;
const int nmax = 5e5 + 6;
long long dsum[nmax], kk[nmax], revsum[nmax];
long long d[nmax], s;
int n;
vector<int> v;
void arraybhor() {
  for (int i = n; i >= 1; i--) v.push_back(d[i]);
  for (int i = 1; i <= n; i++) dsum[i] = d[i] + dsum[i - 1];
  for (int i = n; i >= 1; i--) revsum[i] = d[i] + revsum[i + 1];
  for (int i = 1; i <= n; i++) dsum[i] -= kk[i];
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cin >> n;
  n++;
  for (int i = 1; i < n; i++) cin >> d[i], s += d[i];
  d[n] = n - 1;
  for (long long i = 1; i <= n; i++) kk[i] = i * (i - 1);
  sort(d + 1, d + n + 1, greater<long long>());
  arraybhor();
  int bam = 0, dan = n - 1;
  for (int i = 1; i <= n; i++) {
    long long koyta = lower_bound(v.begin(), v.end(), i) - v.begin();
    long long rightsum;
    if (koyta > n - i)
      rightsum = revsum[i + 1];
    else
      rightsum = revsum[n - koyta + 1] + (n - i - koyta) * (long long)i;
    if (rightsum - dsum[i] < 0)
      dan = min(dan, n - 1 + (int)rightsum - (int)dsum[i]);
  }
  d[1] = 0;
  sort(d + 1, d + n + 1, greater<long long>());
  v.clear();
  arraybhor();
  for (int i = 1; i <= n; i++) {
    long long koyta = lower_bound(v.begin(), v.end(), i) - v.begin();
    long long rightsum;
    if (koyta > n - i)
      rightsum = revsum[i + 1];
    else
      rightsum = revsum[n - koyta + 1] + (n - i - koyta) * (long long)i;
    if (rightsum - dsum[i] < 0) {
      if (-rightsum + dsum[i] > i) cout << "-1", exit(0);
      bam = max(bam, -(int)rightsum + (int)dsum[i]);
    }
  }
  vector<int> ans;
  for (int i = bam; i <= dan; i++) {
    if (s % 2 == i % 2) {
      ans.push_back(i);
    }
  }
  if (ans.size()) {
    for (auto x : ans) cout << x << " ";
  } else {
    cout << "-1";
  }
}
