#include <bits/stdc++.h>
using namespace std;
long long n, p[200005];
int pn;
int main() {
  scanf("%I64d", &n);
  n *= 2;
  for (int k = 0; k < 60; ++k) {
    long long a = (1LL << (k + 1)) - 3;
    long long l = 0, r = 2000000000;
    if (a > 1) r = min(r, n / a + 1);
    while (r - l > 1) {
      long long x = (r + l) / 2;
      if (x * x + a * x <= n)
        l = x;
      else
        r = x;
    }
    if (l % 2 == 1 && l * l + a * l == n) p[pn++] = (l << k);
  }
  if (pn == 0) {
    puts("-1");
    exit(0);
  }
  sort(p, p + pn);
  for (int i = 0; i < pn; ++i) printf("%I64d\n", p[i]);
  return 0;
}
