#include <bits/stdc++.h>
using namespace std;
long long eval(long long i, long long N, long long X) {
  return i * i + i * X - 2LL * N;
}
int main() {
  long long N;
  cin >> N;
  vector<long long> sol;
  for (long long p = 1;; p *= 2LL) {
    long long X = p - 1;
    X = 2LL * X - 1;
    long long i = 1;
    if (eval(i, N, X) > 0) break;
    long long pas = 2;
    while (pas > 1) {
      if (eval(i, N, X) == 0) break;
      if (eval(i + pas, N, X) <= 0) {
        i += pas;
        pas *= 2LL;
        continue;
      }
      pas /= 2;
    }
    if (eval(i, N, X) == 0) sol.push_back(i * p);
  }
  sort(sol.begin(), sol.end());
  if (sol.size() == 0) sol.push_back(-1);
  for (int i = 0; i < sol.size(); ++i) cout << sol[i] << '\n';
}
