#include <bits/stdc++.h>
const long long M = (long long)1 << 31;
long long C(long long m, long long p) {
  long long x = (m - 1) * m / 2, y = m * (p - 1);
  if (x < 0 || y < 0 || m > M || (log(p) + log(m) > 63 * log(2))) return -1;
  return x + y;
}
int main() {
  long long n;
  while (scanf("%I64d", &n) != EOF) {
    long long p = 1, w = n + 1;
    bool is = 0;
    for (int i = 0; p <= w; i++) {
      long long L = (long long)0, R = n * 2, s, m;
      while (L < R) {
        m = (R - L) / 2 + L;
        s = C(m, p);
        if (R - L == 1) {
          if (C(R, p) == n) m = R;
          if (C(L, p) == n) m = L;
          break;
        }
        if (s == n) break;
        if (s > n || s < 0)
          R = m;
        else
          L = m;
      }
      if (n == s && (m & 1)) is = 1, printf("%I64d\n", p * m);
      p <<= 1;
    }
    if (!is) puts("-1");
  }
  return 0;
}
