#include <bits/stdc++.h>
using namespace std;
mt19937 gen_rand;
template <typename T, typename U>
ostream &operator<<(ostream &os, pair<T, U> &a) {
  os << "(";
  os << a.first << ", ";
  os << a.second;
  os << ")";
  return os;
}
template <typename T>
ostream &operator<<(ostream &os, vector<T> &a) {
  os << "{";
  bool was = false;
  for (auto &x : a) {
    if (was) {
      os << ", ";
    }
    was = true;
    os << x;
  }
  os << "}";
  return os;
}
template <typename T>
inline void debug(const char *sdbg, T x) {
  cerr << "The value of " << sdbg << " is " << x << "\n";
};
template <typename T, typename... U>
inline void debug(const char *sdbg, T h, U... t) {
  cerr << "The value of ";
  while (*sdbg != ',') {
    cerr << *sdbg++;
  }
  cerr << " is " << h << "\n";
  debug(sdbg + 1, t...);
  cerr << "\n";
}
template <typename T>
T abs(T x) {
  if (x < 0) {
    return -x;
  } else {
    return x;
  }
}
template <typename T>
T sqr(T x) {
  return x * x;
};
const long long INF_FOR_SHORT_TIME = (long long)(1e9);
template <typename T>
T mul(T a, T b, T m) {
  if (a <= INF_FOR_SHORT_TIME && b <= INF_FOR_SHORT_TIME) {
    return (a * b) % m;
  }
  T q = (long long)((long double)a * (long double)b / (long double)m);
  T r = a * b - q * m;
  return (r + 5 * m) % m;
}
template <typename T, typename U>
T binpow(T a, U n, T MOD) {
  T res = 1;
  while (n) {
    if (n & 1) {
      res = mul(res, a, MOD);
    }
    a = mul(a, a, MOD);
    n >>= 1;
  }
  return res;
};
template <typename T>
int sign(T x) {
  if (x < 0) {
    return -1;
  } else if (x > 0) {
    return 1;
  } else {
    return 0;
  }
};
template <typename T>
T gcd(T a, T b) {
  if (a > b) {
    swap(a, b);
  }
  while (a) {
    b %= a;
    swap(a, b);
  }
  return b;
};
template <typename T>
bool uin(T &a, T b) {
  if (a > b) {
    a = b;
    return true;
  }
  return false;
};
template <typename T>
bool uax(T &a, T b) {
  if (a < b) {
    a = b;
    return true;
  }
  return false;
};
void solve(vector<long long> a) {
  long long n = int((a).size());
  sort((a).rbegin(), (a).rend());
  vector<long long> psum(n);
  for (long long i = 0; i < n; ++i) {
    psum[i] = a[i];
    if (i > 0) {
      psum[i] += psum[i - 1];
    }
  }
  vector<long long> ssum(n);
  for (long long i = n - 1; i >= 0; --i) {
    ssum[i] = a[i];
    if (i + 1 < n) {
      ssum[i] += ssum[i + 1];
    }
  }
  pair<long long, long long> res = make_pair(0, n + 1);
  for (long long k = 1; k < n; ++k) {
    long long buf = 0;
    long long l = k - 1;
    long long r = n;
    while (l + 1 < r) {
      long long m = (l + r) / 2;
      if (a[m] > k) {
        l = m;
      } else {
        r = m;
      }
    }
    if (l != k - 1) {
      buf += (psum[l] - psum[k - 1]) - (l - k + 1) * k;
    }
    l = a[k - 1];
    r = n + 1;
    while (l + 1 < r) {
      long long m = (l + r) / 2;
      if (psum[k - 1] - a[k - 1] + m >
          k * (k - 1) + ssum[k] - buf + min(k, a[k - 1])) {
        r = m;
      } else {
        l = m;
      }
    }
    uin(res.second, r);
    l = -1;
    r = a[k - 1] + 1;
    while (l + 1 < r) {
      long long m = (l + r) / 2;
      if (psum[k - 1] > k * (k - 1) + ssum[k] - buf + m) {
        l = m;
      } else {
        r = m;
      }
    }
    if (r == a[k - 1] + 1) {
      res.first = n + 100;
    } else {
      uax(res.first, r);
    }
  }
  if (res.first % 2 != psum[n - 1] % 2) {
    ++res.first;
  }
  if (res.second % 2 != psum[n - 1] % 2) {
    --res.second;
  }
  vector<long long> ans;
  for (long long i = res.first; i <= res.second; i += 2) {
    long long cnt0 = psum[n - 1];
    long long cnt1 = i;
    if (i > a[n - 1]) {
      cnt0 += i - a[n - 1];
      cnt1 += a[n - 1] - i;
    }
    if (i >= 0 && i <= n && cnt0 <= n * (n - 1) + min(n, cnt1)) {
      ans.push_back(i);
    }
  }
  if (ans.empty()) {
    cout << "-1";
  } else {
    for (auto x : ans) {
      cout << x << " ";
    }
  }
}
int main() {
  gen_rand.seed(time(0));
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  cout.tie(nullptr);
  long long n;
  cin >> n;
  vector<long long> a(n);
  for (long long i = 0; i < n; ++i) {
    cin >> a[i];
  }
  solve(a);
  return 0;
}
