#include <bits/stdc++.h>
using namespace std;
long long n, m, i, j, a[500005], b[500005], s[500005], l, r, mid, ans1, ans2, f,
    ss;
int check(long long x) {
  if ((x & 1) != ss) x++;
  if (x > n) return -1;
  memcpy(b, a, sizeof(a));
  b[n + 1] = x;
  sort(b + 1, b + n + 2, greater<int>());
  long long l = 0, i, j = n + 1, r = 0;
  for ((i) = 1; (i) <= (n + 1); (i)++) {
    s[i] = s[i - 1] + b[i];
  }
  for ((i) = 1; (i) <= (n + 1); (i)++) {
    while (j > i && b[j] <= i) {
      j--;
    }
    j = max(j, i);
    l += b[i];
    if (l > i * (i - 1) + s[n + 1] - s[j] + (j - i) * i) {
      if (b[i] <= x) return -1;
      if (b[i] > x) return 1;
    }
  }
  return 0;
}
int main() {
  scanf("%I64d", &n);
  for ((i) = 1; (i) <= (n); (i)++) {
    scanf("%I64d", &a[i]);
    ss += a[i];
  }
  ss = (ss & 1);
  l = 0;
  r = n + 1;
  f = -1;
  while (l < r) {
    mid = (l + r) / 2;
    long long t = check(mid);
    if (t == 0) {
      f = mid;
      break;
    }
    if (t == 1)
      l = mid + 1;
    else
      r = mid;
  }
  if (f == -1) {
    puts("-1");
    return 0;
  }
  if ((f & 1) != ss) f++;
  l = -1;
  r = f;
  while (l < r) {
    mid = (l + r + 1) / 2;
    long long t = check(mid);
    if (t == 0) {
      ans1 = mid;
      r = mid - 1;
    } else if (t == 1)
      l = mid;
    else
      r = mid - 1;
  }
  l = f;
  r = n + 1;
  while (l < r) {
    mid = (l + r) / 2;
    long long t = check(mid);
    if (t == 0) {
      ans2 = mid;
      l = mid + 1;
    } else if (t == 1)
      l = mid + 1;
    else
      r = mid;
  }
  for ((i) = (ans1); (i) <= (ans2); (i)++)
    if ((i & 1) == ss) printf("%I64d ", i);
  return 0;
}
