#include <bits/stdc++.h>
using namespace std;
long long n, kol, a[1111];
void ok(long long x) {
  long long l = 0,
            r = min(2000000000ll, 1000000000 * 1ll * 1000000000 / (x + 1) + 1);
  while (l < r) {
    long long m = (l + r) / 2;
    if (m * (m - 1) / 2 + m * x >= n)
      r = m;
    else
      l = m + 1;
    if (m * (m - 1) / 2 + m * x == n && m % 2 != 0) a[++kol] = m + m * x;
  }
}
int main() {
  cin >> n;
  kol = 0;
  for (int i = 0; i < 60; i++) ok((1ll << i) - 1);
  if (kol == 0) {
    cout << -1;
    return 0;
  }
  for (int i = 1; i <= kol; i++) cout << a[i] << endl;
  cin >> n;
  return 0;
}
