#include <bits/stdc++.h>
using namespace std;
inline int rdi() {
  int d;
  scanf("%d", &d);
  return d;
}
inline char rdc() {
  scanf(" ");
  return getchar();
}
inline string rds() {
  string s;
  cin >> s;
  return s;
}
inline double rddb() {
  double d;
  scanf("%lf", &d);
  return d;
}
template <class T>
inline bool updateMin(T& a, T b) {
  return a > b ? a = b, true : false;
}
template <class T>
inline bool updateMax(T& a, T b) {
  return a < b ? a = b, true : false;
}
const double eps = 1e-6;
long long n;
vector<long long> ans;
long long solve(double b, double c) {
  return (-b + sqrt(b * b - 4 * c)) * 0.5 + 0.5;
}
int main() {
  cin >> n;
  for (int i = (1); i <= (63); ++i) {
    long long x = solve((1LL << i) - 3, -2 * n);
    if (x & 1 && x * x + ((1LL << i) - 3) * x == 2 * n)
      ans.push_back(x << (i - 1));
  }
  if (((int)(ans).size())) {
    sort(ans.begin(), ans.end());
    ans.erase(unique(ans.begin(), ans.end()), ans.end());
    for (int i = (0); i < (((int)(ans).size())); ++i) cout << ans[i] << endl;
  } else
    puts("-1");
  return 0;
}
