#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:1000000000,1000000000")
using namespace std;
const long long inf = 1e18 + 7;
const long long mod = 1e9 + 7;
const double eps = 1e-9;
const double PI = 2 * acos(0.0);
const double E = 2.71828;
long long n, two;
bool f(long long m) {
  if (log(m + .0) + log(two - 1.0) > log(5.0 * inf)) return false;
  if (m * (m - 1) / 2LL + (two - 1) * m <= n) return true;
  return false;
}
int main(void) {
  cin >> n;
  set<long long> ans;
  for (long long(i) = 0; (i) < (long long)(63); (i)++) {
    two = 1;
    for (long long(j) = 0; (j) < (long long)(i); (j)++) two <<= 1LL;
    long long l = 0, r = 2 * mod;
    while (r - l > 1) {
      long long m = (l + r) >> 1LL;
      if (f(m))
        l = m;
      else
        r = m;
    }
    if (l * (l - 1) / 2LL + (two - 1) * l == n && l & 1LL) ans.insert(two * l);
  }
  if (!ans.size()) puts("-1");
  for (set<long long>::iterator i = ans.begin(); i != ans.end(); i++)
    cout << *i << endl;
  return 0;
}
