#include <bits/stdc++.h>
using namespace std;
const int maxint = -1u >> 1;
const double pi = 3.14159265358979323;
const double eps = 1e-8;
long long n;
long long limit;
long long calc(long long tmp) {
  long long l = 0;
  long long r = limit;
  if (tmp != 0) r = min(r, n / tmp + 1);
  while (l <= r) {
    long long mid = (l + r) >> 1;
    long long x = 2 * mid + 1;
    long long sum = x * tmp + x * (x - 1) / 2;
    if (sum == n) return x;
    if (sum > n)
      r = mid - 1;
    else
      l = mid + 1;
  }
  return -1;
}
vector<long long> vec;
void solve() {
  long long tmp = 1;
  limit = (long long)sqrt(n * 1.0) + 1LL;
  for (long long a = 0; a < 61; a++) {
    if (tmp - 1 > n) break;
    long long b = calc(tmp - 1);
    if (b != -1) {
      vec.push_back(tmp * b);
    }
    tmp *= 2;
  }
  sort(vec.begin(), vec.end());
  if (vec.size() == 0) {
    cout << -1 << endl;
    return;
  }
  for (int i = 0; i < vec.size(); i++) cout << vec[i] << endl;
}
int main() {
  cin >> n;
  solve();
  return 0;
}
