#include <bits/stdc++.h>
using namespace std;
long long n;
vector<long long> ans;
int main() {
  srand(time(0));
  cin >> n;
  for (int k = 0; k <= 60; k++) {
    long long q = (1LL << k) - 1;
    long long left = 1,
              right = min((long long)sqrt(4 * n + .0), q ? n / q : n + 1);
    while (left < right) {
      long long p = (left + right) >> 1;
      if (p * (q + (p - 1) / 2) >= n)
        right = p;
      else
        left = p + 1;
    }
    long long p = left;
    if (p * (q + (p - 1) / 2) != n || (p % 2 == 0)) continue;
    ans.push_back(p * (q + 1));
  }
  if (ans.empty()) cout << -1 << endl;
  for (size_t i = 0; i < ans.size(); i++) cout << ans[i] << endl;
  return 0;
}
