#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n;
  cin >> n;
  vector<long long> ans;
  for (long long p2 = 1; p2 <= n + 1; p2 *= 2) {
    long long add = p2 - 1;
    long long l = 1, r = 2e9;
    while (r - l > 1) {
      long long x = (r + l) / 2;
      if (n / x < (x - 1) / 2 + add) {
        r = x;
      } else
        l = x;
    }
    if (l % 2 && l * (add + (l - 1) / 2) == n) ans.push_back(p2 * l);
  }
  sort(ans.begin(), ans.end());
  if (ans.empty()) {
    cout << -1 << endl;
  } else {
    for (int i = 0; i < ans.size(); ++i) cout << ans[i] << endl;
  }
  return 0;
}
