#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, val, lo, hi, mid, f;
  int i;
  cin >> n;
  vector<long long> ans;
  for (i = 1; i <= 60; i++) {
    val = (1LL << i) - 3;
    lo = 1;
    hi = n;
    while (lo < hi) {
      mid = (lo + hi) / 2;
      if ((2 * n) / (mid) <= mid + val) {
        hi = mid;
      } else
        lo = mid + 1;
    }
    if (lo * (lo + val) == 2 * n && lo % 2) ans.push_back(lo * ((val + 3) / 2));
  }
  if (ans.size() == 0)
    cout << "-1" << endl;
  else {
    for ((i) = 0; (i) < (ans.size()); (i)++) cout << ans[i] << endl;
  }
  return 0;
}
