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