#include <bits/stdc++.h>
using namespace std;
int calc(int n) {
  int ret = 0;
  while (true) {
    if (n == 1) return ret;
    if (n & 1) return ret + (n * (n - 1)) / 2;
    ret += n / 2;
    n /= 2;
  }
}
long long eval(long long x, long long res) {
  long long p2 = (res + (x - 1) / 2);
  if (p2 == 0) return 0;
  if (x > (1LL << 62) / p2) return (1LL << 62);
  return x * p2;
}
int main() {
  long long n;
  cin >> n;
  int f = 0;
  for (long long i = 1; i < (1LL << 60); i <<= 1) {
    long long res = i - 1;
    long long lo = 0, hi = 1000000000000000000LL;
    while (hi > lo) {
      long long mid = (lo + hi) / 2;
      long long e = eval(2 * mid + 1, res);
      if (e >= n)
        hi = mid;
      else
        lo = mid + 1;
    }
    if ((2 * lo + 1) * (res + lo) == n) {
      cout << (2 * lo + 1) * i << endl;
      f = 1;
    }
  }
  if (!f) cout << -1 << endl;
}
