#include <bits/stdc++.h>
using namespace std;
const long long inf = (long long)2e18;
long long n;
vector<long long> res;
long long Find(long long t) {
  long long l = 1, r = inf;
  while (r - l > 1) {
    long long mid = (l + r) / 2;
    if (n / mid >= mid - 1 + t)
      l = mid;
    else
      r = mid;
  }
  if (n / l >= l - 1 + t && l * (l - 1 + t) == n) return l;
  return -1;
}
int main() {
  cin >> n;
  n *= 2;
  for (long long t = 1; t <= inf; t *= 2) {
    long long x = Find(2 * (t - 1));
    if (x != -1 && x % 2 == 1) res.push_back(x * t);
  }
  if (res.empty())
    puts("-1");
  else {
    sort(res.begin(), res.end());
    res.erase(unique(res.begin(), res.end()), res.end());
    for (__typeof(res.begin()) it = res.begin(); it != res.end(); ++it)
      printf(
          "%lld"
          "\n",
          *it);
  }
  return 0;
}
