#include <bits/stdc++.h>
using namespace std;
const long long INF = 2e18;
const int M = 1e9 + 9;
const int N = 100;
const double eps = 1e-6;
long long n;
set<long long> ans;
set<long long>::iterator it;
bool check(long long t) {
  long long res = 0;
  while (t % 2 == 0) t /= 2, res += t;
  res += t * (t - 1) / 2;
  return res == n;
}
int main() {
  cin >> n;
  for (long long i = 0; i < 63; i++) {
    long long p = (1LL << i) - 1;
    long long L = 0, R = 2000000000;
    while (L < R) {
      long long m = (L + R) >> 1;
      if (p > 0 && INF / p < m) {
        R = m;
        continue;
      }
      if (m * (m - 1) / 2 + m * p - n < 0)
        L = m + 1;
      else
        R = m;
    }
    if (check(R * (p + 1))) ans.insert(R * (p + 1));
  }
  if (ans.size() == 0)
    puts("-1");
  else
    for (it = ans.begin(); it != ans.end(); it++) cout << *it << endl;
  return 0;
}
