#include <bits/stdc++.h>
using namespace std;
const double eps = 1e-9;
const int MX = 500000 + 5;
const int mod = 998244353;
const int INF = 0x3f3f3f3f;
int n;
int a[MX];
long long sum[MX];
bool cmp(int x, int y) { return x > y; }
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) scanf("%d", &a[i]);
  sort(a + 1, a + n + 1, cmp);
  for (int i = 1; i <= n; i++) sum[i] = sum[i - 1] + a[i];
  int l = 0, r = n;
  for (int i = 1; i <= n; i++) {
    int pos = lower_bound(a + i + 1, a + n + 1, i, greater<int>()) - a;
    long long sum1 = sum[i];
    long long sum2 = (long long)i * (i - 1) + sum[n] - sum[pos - 1] +
                     (long long)i * (pos - i - 1);
    if (sum1 > sum2 + i) {
      puts("-1");
      return 0;
    }
    l = max(1ll * l, sum1 - sum2);
    r = min(1ll * r, sum2 + i + pos - 1 - sum1);
  }
  bool flag = 0;
  for (int i = l; i <= r; i++) {
    if ((i + sum[n]) % 2 == 0) {
      printf("%d ", i);
      flag = 1;
    }
  }
  if (!flag) printf("-1");
  printf("\n");
  return 0;
}
