#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n;
  cin >> n;
  vector<unsigned long long> an;
  unsigned long long ans1 = 1;
  an.push_back(ans1);
  for (int i = 0; i < 63; i++) {
    ans1 *= 2;
    an.push_back(ans1);
  }
  unsigned long long mid = 1;
  vector<unsigned long long> q;
  for (int i = 0; i < an.size(); i++) {
    unsigned long long l = 0;
    unsigned long long r = 1e11;
    while (r - l > 1) {
      mid = (l + r) / 2;
      if (((mid * (mid - 1)) / 2) + mid * (an[i] - 1) > n) {
        r = mid;
      } else {
        l = mid;
      }
    }
    if ((l * (l - 1)) / 2 + l * (an[i] - 1) == n) {
      if (an[i] == 1) {
        if (l % 2 == 0) {
          continue;
        } else {
          q.push_back(l);
          continue;
        }
      } else {
        if (l % 2 == 1) {
          q.push_back(l + l * (an[i] - 1));
        }
      }
    }
  }
  if (q.size() == 0) {
    cout << -1;
    return 0;
  }
  map<long long, int> w;
  sort(q.begin(), q.end());
  for (int i = 0; i < q.size(); i++) {
    w[q[i]]++;
    if (w[q[i]] == 1) cout << q[i] << " ";
  }
  return 0;
}
