#include <bits/stdc++.h>
using namespace std;
long long n;
int main() {
  cin >> n;
  long long l, r, re;
  long long step = 1;
  bool ok = false;
  while (step <= (long long)2000000000 * 2000000000) {
    r = min((long long)2000000000, (long long)2000000000 * 2000000000 / step);
    l = 0;
    while (r - l > 3) {
      re = (l + r) / 2;
      if (!(re & 1)) re--;
      if ((re * (re - 1)) / 2 + re * (step - 1) < n)
        l = re;
      else
        r = re;
    }
    for (long long i = l; i <= r; i++)
      if ((i & 1) && (i * (i - 1)) / 2 + i * (step - 1) == n) {
        ok = true;
        cout << step * i << endl;
      }
    step *= 2;
  }
  if (!ok) cout << "-1" << endl;
  return 0;
}
