#include <bits/stdc++.h>
using namespace std;
const long long maxX = 1414213561;
set<long long> ans;
int main() {
  long long n;
  scanf("%I64d", &n);
  long long pow = 1;
  for (;;) {
    if (pow - 1 > n) break;
    long long l = 1, r, m, tmp;
    if (pow > 1)
      r = min(maxX, n / (pow - 1));
    else
      r = maxX;
    while (l < r) {
      m = (l + r) / 2;
      tmp = (pow - 1) * m + m * (m - 1) / 2;
      if (tmp > n) r = m - 1;
      if (tmp < n) l = m + 1;
      if (tmp == n) l = r = m;
    }
    tmp = (pow - 1) * l + l * (l - 1) / 2;
    if (l % 2 == 1 && tmp == n) ans.insert(pow * l);
    pow *= 2;
  }
  if (!ans.empty()) {
    for (set<long long>::iterator i = ans.begin(); i != ans.end(); ++i)
      printf("%I64d\n", *i);
  } else
    printf("-1\n");
  return 0;
}
