#include <bits/stdc++.h>
using namespace std;
unsigned long long n;
set<long long> s;
long long bSearch(long long d) {
  long long lo = 1;
  long long hi = 2000000000LL;
  long long k = (1LL << d) - 1;
  if (k > n) return -1;
  while (lo <= hi) {
    long long x = (lo + hi) / 2;
    double tmp = 1.0 * x * k;
    if (tmp > n) {
      hi = x - 1;
      continue;
    }
    long long F = (x * (x - 1) / 2) + x * k - n;
    if (F < 0)
      lo = x + 1;
    else if (F > 0)
      hi = x - 1;
    else
      return x;
  }
  return -1;
}
int main() {
  cin >> n;
  bool ok = false;
  for (long long k = 0; k <= 62; k++) {
    long long x = bSearch(k);
    if (x == -1 || x % 2 == 0) continue;
    ok = true;
    long long ans = (1LL << (k)) * x;
    s.insert(ans);
  }
  if (!ok)
    puts("-1");
  else {
    set<long long>::iterator it;
    for (it = s.begin(); it != s.end(); it++) cout << *it << endl;
  }
  return 0;
}
