#include <bits/stdc++.h>
using namespace std;
long long n;
long long ep;
long long l, r;
long long mid;
long long tmp;
vector<long long> ans;
int main() {
  ans.clear();
  scanf("%I64d", &n);
  for (int k = 0; k <= 61; k++) {
    ep = (1LL << k) - 1;
    if (ep > n) break;
    l = 0;
    r = min(2000000000LL, ep == 0 ? 2000000000LL : (n / ep + 1));
    while (l < r) {
      mid = (l + r) >> 1;
      tmp = (mid * (mid - 1LL)) / 2 + mid * ep;
      if (tmp >= n)
        r = mid;
      else
        l = mid + 1;
    }
    tmp = (r * (r - 1LL)) / 2 + r * ep;
    if (tmp == n && (r & 1 == 1)) ans.push_back(r * (ep + 1));
  }
  sort(ans.begin(), ans.end());
  if (ans.empty())
    printf("-1\n");
  else
    for (int i = 0; i < ans.size(); i++) {
      printf("%I64d\n", ans[i]);
    }
}
