#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n;
  cin >> n;
  vector<long long> ans;
  long long pow = 1;
  while (pow - 1 <= n) {
    long long z = pow - 1, from = 0, to = 1;
    while ((2 * to + 1) * (z + to) <= n) to *= 2;
    while (from + 1 < to) {
      long long middle = (from + to) / 2;
      if ((2 * middle + 1) * (z + middle) <= n)
        from = middle;
      else
        to = middle;
    }
    if ((2 * from + 1) * (z + from) == n) ans.push_back((2 * from + 1) * pow);
    pow *= 2;
  }
  sort(ans.begin(), ans.end());
  if (ans.empty()) puts("-1");
  for (int i = 0; i < ans.size(); i++) printf("%I64d\n", ans[i]);
}
