#include <bits/stdc++.h>
using namespace std;
const int MAXN = 67;
long long ans[MAXN], nans;
int main() {
  long long n;
  while (cin >> n) {
    nans = 0;
    long long p, l, r, m;
    for (p = 1; p - 1 <= n; p *= 2) {
      l = 1, r = min(n / p, 1LL << 31);
      while (l < r) {
        m = (l + r) >> 1;
        long long sum = (p - 1) * m + m * (m - 1) / 2;
        if (sum >= n)
          r = m;
        else
          l = m + 1;
      }
      if (l & 1 && (p - 1) * l + l * (l - 1) / 2 == n) ans[nans++] = p * l;
    }
    if (!nans)
      puts("-1");
    else {
      for (int i = 0; i < nans; i++) cout << ans[i] << endl;
    }
  }
  return 0;
}
