#include <bits/stdc++.h>
using namespace std;
long long a[100005];
long long c;
void Solve(long long n) {
  long long k;
  for (k = 0; k < 63; k++) {
    long long l = 1, r = 3 * 1e9;
    if (k >= 30) r = 1000000000000000000 >> k;
    while (l <= r) {
      long long mid = (l + r) >> 1;
      long long ans = (((long long)1 << k) - 1) * mid * 2 + mid * (mid - 1);
      if (ans > 2 * n)
        r = mid - 1;
      else if (ans < 2 * n)
        l = mid + 1;
      else {
        if (mid & 1) a[c++] = mid * ((long long)1 << k);
        break;
      }
    }
  }
}
int main() {
  long long n, i;
  while (cin >> n) {
    c = 0;
    Solve(n);
    sort(a, a + c);
    if (c == 0)
      puts("-1");
    else {
      for (i = 0; i < c; i++) cout << a[i] << endl;
    }
  }
  return 0;
}
