#include <bits/stdc++.h>
using namespace std;
long long n;
long long calc(long long x, int t) {
  long long ans = x * (x - 1) / 2;
  long long tmp = x;
  for (int i = 0; i < t; i++) {
    ans += tmp;
    tmp *= 2;
  }
  return ans;
}
long long a[1000];
int cnt;
long long solve(int t) {
  long long l = 1, r = (n + 1) / 2;
  while (l <= r) {
    long long mid = (l + r) / 2;
    long long x = 2 * mid - 1;
    double pp = (double)x * (x - 1) / 2 + (double)(pow(2, t) - 1) * x;
    if (pp >= n + 1) {
      r = mid - 1;
      continue;
    }
    long long tmp = calc(x, t);
    if (tmp == n) return x * (1LL << t);
    if (tmp > n)
      r = mid - 1;
    else
      l = mid + 1;
  }
  return -1;
}
int main() {
  while (cin >> n) {
    cnt = 0;
    for (int t = 0; t <= 64; t++) {
      if (pow(2, t) > n + 1) break;
      long long tmp = solve(t);
      if (tmp == -1) continue;
      a[cnt++] = tmp;
    }
    if (cnt == 0)
      printf("-1\n");
    else {
      sort(a, a + cnt);
      for (int i = 0; i < cnt; i++) cout << a[i] << endl;
    }
  }
  return 0;
}
