#include <bits/stdc++.h>
using namespace std;
const long long inf = 2e18;
vector<long long> vec;
long long n;
void find(int k) {
  long long l = 1, r = inf, ret = -1;
  while (l <= r) {
    long long mid = (l + r) >> 1;
    double t1 = (1ll << k) - 3.0 + mid, t2 = mid;
    if (t1 * t2 == n * 2) {
      ret = mid;
      break;
    } else if (t1 * t2 > 2 * n)
      r = mid - 1;
    else
      l = mid + 1;
  }
  if (ret != -1 && (ret % 2)) vec.push_back(ret * (1ll << (k - 1)));
}
int main() {
  cin >> n;
  for (int k = 1; k < 63; k++) {
    find(k);
  }
  if (vec.size() == 0)
    cout << -1 << endl;
  else {
    sort(vec.begin(), vec.end());
    for (int i = 0; i < vec.size(); ++i) cout << vec[i] << endl;
  }
  return 0;
}
