#include <bits/stdc++.h>
using namespace std;
bool sw = false;
long double n;
vector<long double> v;
bool good(long double a) {
  if (sqrt(a) == floor(sqrt(a))) return true;
  return false;
}
void out(long double a) {
  if (a <= 0) return;
  while (fmod(a, 2.0) == 0) a /= 2;
  long double ans = a * (a - 1) / 2;
  while (ans < n) {
    ans += a;
    a *= 2;
  }
  if (ans == n) {
    sw = true;
    v.push_back(a);
  }
}
int main() {
  cin >> n;
  for (long double i = 1; i <= n; i *= 2) {
    long double p = i - 1;
    long double b = 2 * p - 1;
    if (good(b * b + 8 * n)) {
      long double d = sqrt(b * b + 8 * n) + 1 - 2 * p;
      long double d1 = -sqrt(b * b + 8 * n) + 1 - 2 * p;
      if (fmod(d, 2.0) == 0) {
        d /= 2;
        out(d);
      }
      if (fmod(d1, 2.0) == 0) {
        d1 /= 2;
        out(d1);
      }
    }
  }
  sort(v.begin(), v.end());
  int N = unique(v.begin(), v.end()) - v.begin();
  if (N == 0) {
    cout << -1 << endl;
    return 0;
  }
  for (int i = 0; i < N; i++) cout << (unsigned long long)(v[i]) << endl;
  return 0;
}
