#include <bits/stdc++.h>
using namespace std;
const int MAX_N = 500000 + 7;
long long A[MAX_N], S[MAX_N];
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  int N;
  cin >> N;
  for (int i = 1; i <= N; i++) cin >> A[i];
  sort(A + 1, A + N + 1);
  S[0] = 0;
  for (int i = 1; i <= N; i++) S[i] = S[i - 1] + A[i];
  long long lb = 0, rb = N;
  for (int i = 1; i <= N + 1; i++) {
    if (i > 1) {
      long long t = lower_bound(A + 1, A + N + 1 - i + 1, i) - A - 1;
      rb = min(rb, ((long long)i * (i - 1) + S[t] + (N + 1 - i - t) * i) -
                       (S[N] - S[N - i + 1]));
    }
    if (i <= N) {
      long long t = lower_bound(A + 1, A + N + 1 - i, i) - A - 1;
      if ((S[N] - S[N - i]) >
          ((long long)i * (i - 1) + S[t] + (N - i - t) * i) + i) {
        lb = N + 1;
        break;
      }
      lb = max(lb, (S[N] - S[N - i]) -
                       ((long long)i * (i - 1) + S[t] + (N - i - t) * i));
    }
  }
  vector<long long> vs;
  for (long long i = lb; i <= rb; i++) {
    if ((i & 1) == (S[N] & 1)) vs.push_back(i);
  }
  if (vs.empty())
    cout << -1 << '\n';
  else {
    for (int i = 0; i < (int)vs.size(); i++)
      cout << vs[i] << " \n"[i == (int)vs.size() - 1];
  }
  return 0;
}
