#include <bits/stdc++.h>
using namespace std;
template <class T>
inline T sqr(T x) {
  return x * x;
}
template <class T>
inline T lcm(T a, T b) {
  if (a < 0) return lcm(-a, b);
  if (b < 0) return lcm(a, -b);
  return a * (b / __gcd(a, b));
}
template <class T>
T power(T N, T P) {
  return (P == 0) ? 1 : N * power(N, P - 1);
}
template <class T>
string itoa(T a) {
  if (!a) return "0";
  string ret;
  for (T i = a; i > 0; i = i / 10) ret.push_back((i % 10) + 48);
  reverse(ret.begin(), ret.end());
  return ret;
}
double log(double N, double B) { return (log10l(N)) / (log10l(B)); }
vector<string> token(string a, string b) {
  const char *q = a.c_str();
  while (count(b.begin(), b.end(), *q)) q++;
  vector<string> oot;
  while (*q) {
    const char *e = q;
    while (*e && !count(b.begin(), b.end(), *e)) e++;
    oot.push_back(string(q, e));
    q = e;
    while (count(b.begin(), b.end(), *q)) q++;
  }
  return oot;
}
string tobin(int n) {
  string s;
  for (int i = 8 - 1; i >= 0; i--) s += ((bool)(n & (1 << i)) + '0');
  return s;
}
long long mul(long long a, long long b) {
  if (a == 0 || b == 0) return 0;
  if ((2e18) / b < a) {
    return (2e18);
  } else
    return a * b;
}
long long f(long long x, long long c, long long n) {
  n = n * 2;
  long long xm = x - 1;
  long long get = mul(x, xm);
  get = get + mul(2, mul(c, x));
  if (get - n < 0) return -1;
  if (get - n == 0) return 0;
  return 1;
  return get - n;
}
int main() {
  long long n;
  while (cin >> n) {
    set<long long> sav;
    for (long long a = 0; (1LL << a) <= n + 1; a++) {
      long long c = (1LL << a) - 1;
      long long lo = 0, hi = 2 * n;
      while (lo <= hi) {
        long long mid = (hi + lo) / 2;
        long long x = mid;
        long long ret = f(x, c, n);
        if (ret == 0) {
          if (x % 2 == 1) sav.insert(x * (1LL << a));
          break;
        }
        if (ret > 0) {
          hi = mid - 1;
        } else
          lo = mid + 1;
      }
    }
    if (!(int)sav.size()) sav.insert(-1);
    for (__typeof((sav).begin()) it = (sav).begin(); it != (sav).end(); it++)
      cout << *it << endl;
  }
  return 0;
}
