#include <bits/stdc++.h>
using namespace std;
int main(void) {
  unsigned long long target = 0;
  cin >> target;
  vector<unsigned long long> results;
  for (unsigned long long series_ix = 0;; series_ix++) {
    unsigned long long series_first = (1LL << series_ix);
    if (series_first > 1000000000000000000LL) break;
    unsigned long long p1_to_p2_ratio = series_first - 1;
    unsigned long long max_p2_input = 3037000000LL;
    if (p1_to_p2_ratio > 0) {
      max_p2_input = min(max_p2_input, 0x8000000000000000LL / p1_to_p2_ratio);
    }
    unsigned long long lo = 1;
    unsigned long long hi = (max_p2_input + 1) / 2;
    while (lo <= hi) {
      unsigned long long mid = lo + ((hi - lo) / 2);
      unsigned long long p2_input = (mid * 2) - 1;
      unsigned long long p2 = p2_input * ((p2_input - 1) / 2);
      unsigned long long p1 = p1_to_p2_ratio * p2_input;
      unsigned long long result = p1 + p2;
      if (result == target) {
        results.push_back(p2_input << series_ix);
        break;
      } else if (result < target) {
        lo = mid + 1;
      } else {
        hi = mid - 1;
      }
    }
  }
  sort(results.begin(), results.end());
  if (results.empty()) {
    cout << -1;
  } else {
    for (unsigned long i = 0; i < results.size(); i++) {
      cout << results[i] << endl;
    }
  }
  return 0;
}
