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