#include <bits/stdc++.h>
using namespace std;
void solve(long long n) {
  vector<unsigned long long> ans;
  for (long long b = 1; b <= 60; b++) {
    long double B = pow(2.0l, b) - 3;
    long double D = sqrt(B * B + 8 * n);
    long double x1 = (-B + D) / 2;
    long long X1 = (long long)x1;
    if (X1 * X1 + X1 * B - 2 * n == 0 && X1 >= 1 && X1 % 2 != 0) {
      ans.push_back(X1 * (1ULL << (b - 1)));
    }
  }
  sort(ans.begin(), ans.end());
  if (ans.empty()) {
    cout << "-1\n";
  } else {
    for (long long a : ans) {
      cout << a << "\n";
    }
  }
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  long long n;
  cin >> n;
  solve(n);
  return 0;
}
