#include <bits/stdc++.h>
using namespace std;
const int inf = 1 << 29;
const double dinf = 1e30;
const long long linf = 1LL << 55;
long long n;
long long bound;
long long bs(long long tmp) {
  long long l = 0;
  long long r = bound;
  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;
}
int main() {
  while (cin >> n) {
    vector<long long> vec;
    long long tmp = 1;
    bound = (long long)sqrt(n * 1.0) + 1LL;
    for (long long a = 0; a < 61; a++) {
      if (tmp - 1 > n) break;
      long long b = bs(tmp - 1);
      if (b != -1) {
        vec.push_back(tmp * b);
      }
      tmp *= 2;
    }
    sort(vec.begin(), vec.end());
    if (vec.size() == 0) {
      cout << -1 << endl;
      continue;
    }
    for (int i = 0; i < vec.size(); i++) {
      cout << vec[i] << endl;
    }
  }
  return 0;
}
