#include <bits/stdc++.h>
using namespace std;
long long tm[1000];
long long f(long long k, long long d) {
  assert(((1LL << 62LL) + (1LL << 61LL)) / d >=
         (1LL << k) - 1LL + (d - 1LL) / 2LL);
  return ((1LL << k) - 1LL + (d - 1LL) / 2LL) * d;
}
int main() {
  long long nts = 0;
  long long n;
  cin >> n;
  for (long long k = 0; (1LL << k) <= n + 1LL; k++) {
    long long mx = 1;
    long long mn = 1;
    long long md;
    while (f(k, mx) <= n) mx *= 2LL;
    while (mx - mn > 1LL) {
      md = (mx + mn) / 2LL;
      if (f(k, md) > n)
        mx = md;
      else
        mn = md;
    }
    if (f(k, mn) == n && mn % 2LL == 1LL) tm[nts++] = (1LL << k) * mn;
  }
  sort(tm, tm + nts);
  for (long long i = 0; i < nts; i++) {
    cout << tm[i] << endl;
  }
  if (nts == 0) cout << -1 << endl;
  return 0;
}
