#include <bits/stdc++.h>
using namespace std;
int n;
long long a[500100], s[500100], r[2][500100];
long long ml[500100], mr[500100];
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout << fixed << setprecision(10);
  cin >> n;
  for (int i = 1; i <= n; i++) cin >> a[i];
  sort(a + 1, a + n + 1);
  reverse(a + 1, a + n + 1);
  for (int k = 1; k <= n; k++) s[k] = a[k] + s[k - 1];
  int p = n;
  for (long long k = 1; k <= n + 1; k++) {
    while (p >= k && a[p] <= k) p--;
    while (p < k - 1) p++;
    r[0][k] = s[n] - s[p] + (n - k + 1 - (n - p)) * k;
  }
  p = n;
  for (long long k = 1; k <= n; k++) {
    while (p >= k + 1 && a[p] <= k) p--;
    while (p < k) p++;
    r[1][k] = s[n] - s[p] + (n - k - (n - p)) * k;
  }
  for (long long k = n + 1; k >= 1; k--) {
    long long sl = s[k - 1], sr = k * (k - 1) + r[0][k];
    ml[k] = sr - sl;
    if (k < n + 1) ml[k] = min(ml[k], ml[k + 1]);
  }
  for (long long k = 1; k <= n; k++) {
    long long sl = s[k], sr = k * (k - 1) + r[1][k];
    mr[k + 1] = sr - sl;
    if (mr[k + 1] + k < 0) mr[k + 1] = -n - 10;
    if (k > 1) mr[k + 1] = min(mr[k + 1], mr[k]);
  }
  p = n + 1;
  bool fs = false;
  for (long long res = 0; res <= n; res++) {
    while (p > 1 && res > a[p - 1]) p--;
    bool ia = (s[n] + res) % 2 == 0;
    ia = ia && res <= ml[p];
    ia = ia && (p == 1 || (mr[p] + res >= 0));
    if (ia) cout << (fs ? " " : "") << res, fs = true;
  }
  if (!fs) cout << -1;
  cout << "\n";
}
