#include <bits/stdc++.h>
using namespace std;
long long pow2(long long e) {
  long long r = 1;
  while (e-- > 0) r *= 2;
  return r;
}
long long eq(long long p, long long k) {
  long long r = (p * (p - 1LL)) / 2LL + p * pow2(k) - p;
  return r;
}
void solve(long long n) {
  vector<long long> S;
  for (long long k = 0; k <= 60; k++) {
    long long p2 = max(pow2(k - 1) - 1, 1LL);
    long long b = 1, e = max(1LL, min(4LL * ((long long)sqrt(n)), n / p2 + 1));
    while (e > b + 5) {
      long long m = (e + b) / 2;
      if (eq(m, k) < n)
        b = m;
      else
        e = m + 1;
    }
    for (long long i = b; i <= e; i++)
      if (eq(i, k) == n && i % 2) {
        S.push_back(i * (pow2(k)));
      }
  }
  sort(S.begin(), S.end());
  int T = unique(S.begin(), S.end()) - S.begin();
  if (S.empty())
    printf("-1\n");
  else
    for (int i = 0; i < T; i++) printf("%I64d\n", S[i]);
}
int main() {
  long long n;
  scanf("%I64d", &n);
  solve(n);
  return 0;
}
