#include <bits/stdc++.h>
using namespace std;
vector<long long> v;
inline long long calcn(long long x, long long bk) {
  return x * ((x - 1) / 2 + bk - 1);
}
int main() {
  long long n;
  scanf("%lld", &n);
  for (long long bk = 1; bk - 1 <= n; bk <<= 1) {
    long long x0 = 0, x1 = 2000000000;
    if (bk > 1 && x1 > n / (bk - 1)) x1 = n / (bk - 1);
    while (x0 + 1 < x1) {
      long long x = (x0 + x1) / 2;
      if (calcn(x, bk) >= n)
        x1 = x;
      else
        x0 = x;
    }
    x1 |= 1;
    if (calcn(x1, bk) == n) v.push_back(x1 * bk);
  }
  if (v.empty())
    puts("-1");
  else {
    sort(v.begin(), v.end());
    for (vector<long long>::iterator vit = v.begin(); vit != v.end(); vit++)
      printf("%lld\n", *vit);
  }
  return 0;
}
