#include <bits/stdc++.h>
using namespace std;
void Draganov47() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
}
long long f(long long m, long long pluss) {
  long long res = pluss;
  if (m >= 1500000000) return 2e18;
  long long sum = 0;
  if (m % 2 == 0)
    sum = (m / 2ll) * (m - 1);
  else
    sum = m * ((m - 1) / 2ll);
  return sum + m * (pluss - 1);
}
int main() {
  Draganov47();
  long long n;
  cin >> n;
  set<long long> ans;
  for (long long z = 0; z < 64; z++) {
    long long pluss = (1ll << z);
    long long l = 1, r = (1ll * 1e18 / (max(1ll, pluss - 1)));
    while (l + 1 < r) {
      long long m = (l + r) >> 1ll;
      long long x = (m * 2ll) - 1ll;
      long long counts = f(x, pluss);
      if (counts <= n)
        l = m;
      else
        r = m;
    }
    if (f((l * 2) - 1, pluss) == n) ans.insert(((l * 2) - 1) * pluss);
    if (f((r * 2) - 1, pluss) == n) ans.insert(((r * 2) - 1) * pluss);
  }
  for (auto it = ans.begin(); it != ans.end(); it++) cout << *it << endl;
  if (ans.size() == 0) cout << -1;
  return 0;
}
