#include <bits/stdc++.h>
using namespace std;
int main() {
  long long i, j, k, l, m, n, a;
  double b, c, chk;
  int fg = 0;
  cin >> n;
  for (a = 0; a < 63; a++) {
    b = (1LL << a) - 1;
    b = 2 * b - 1;
    c = 2 * n;
    chk = (-b + sqrt(b * b + 4 * c)) / 2;
    for (k = chk - 100; k < chk + 100; k++) {
      if (k <= 0 || k > 3000000000LL) continue;
      if (k % 2 == 0) continue;
      m = (1LL << a) - 1;
      if (m * k / k != m) continue;
      m *= k;
      m += k * (k - 1) / 2;
      if (m != n) continue;
      fg++;
      cout << (1LL << a) * k << endl;
    }
  }
  if (!fg) cout << -1 << endl;
  return 0;
}
