#include <bits/stdc++.h>
using namespace std;
template <typename T>
struct outputer;
struct outputable {};
template <typename T>
inline auto sqr(T x) -> decltype(x * x) {
  return x * x;
}
template <typename T1, typename T2>
inline bool umx(T1& a, T2 b) {
  if (a < b) {
    a = b;
    return 1;
  }
  return 0;
}
template <typename T1, typename T2>
inline bool umn(T1& a, T2 b) {
  if (b < a) {
    a = b;
    return 1;
  }
  return 0;
}
const int N = 500000;
struct Input {
  int n;
  int a[N];
  bool read() {
    if (!(cin >> n)) {
      return 0;
    }
    for (int i = int(0); i < int(n); ++i) {
      scanf("%d", &a[i]);
    };
    return 1;
  }
  void init(const Input& input) { *this = input; }
};
struct Data : Input {
  vector<int> ans;
  void write() {
    if (!((int)(ans).size())) {
      puts("-1");
      return;
    }
    for (int i = int(0); i < int(((int)(ans).size())); ++i) {
      if (i) {
        printf(" ");
      }
      printf("%d", ans[i]);
    }
    puts("");
  }
};
namespace Main {
struct Solution : Data {
  void solve() {
    int64_t sum = 0;
    for (int i = int(0); i < int(n); ++i) {
      if (a[i] < 0 || a[i] > n) {
        return;
      }
      sum += a[i];
    }
    sort(a, a + n, greater<int>());
    int64_t lb = 0, rb = n;
    {
      int64_t sl = 0, sr = 0, pos = n;
      for (int i = int(0); i < int(n + 1); ++i) {
        while (pos > i && a[pos - 1] < i + 1) {
          sr += a[--pos];
        }
        while (pos < i) {
          sr -= a[pos++];
        }
        int64_t tot = sr + int64_t(pos - i) * (i + 1);
        int64_t val = tot + int64_t(i) * (i + 1) - sl;
        ;
        umn(rb, val);
        if (i < n) {
          sl += a[i];
        }
      }
    }
    {
      int64_t sl = 0, sr = 0, pos = n;
      for (int i = int(0); i < int(n + 1); ++i) {
        while (pos > i && a[pos - 1] < i) {
          sr += a[--pos];
        }
        while (pos < i) {
          sr -= a[pos++];
        }
        int64_t tot = sr + int64_t(pos - i) * i;
        int64_t val = sl - tot - int64_t(i) * (i - 1);
        ;
        umx(lb, val);
        if (i < val) {
          return;
        }
        if (i < n) {
          sl += a[i];
        }
      }
    }
    for (int i = int(0); i < int(n + 1); ++i) {
      if (i >= lb && i <= rb && (sum + i) % 2 == 0) {
        ans.emplace_back(i);
      }
    }
  }
  void clear() { *this = Solution(); }
};
}  // namespace Main
Main::Solution sol;
int main() {
  cout.setf(ios::showpoint | ios::fixed);
  cout.precision(20);
  sol.read();
  sol.solve();
  sol.write();
  return 0;
}
