#include <bits/stdc++.h>
using namespace std;
long long unsigned int n;
long long unsigned int val(long long unsigned int x, long long unsigned int k) {
  if (x >= 1e10) return n + 1;
  long long unsigned int ans = x * (x - 1);
  ans /= 2;
  long long unsigned int kt = k;
  if (ans > n) return n + 1;
  while (k--) {
    x *= 2;
    if (x > 1e19) return n + 1;
  }
  for (int i = 1; i <= kt; i++) {
    ans = ans + x / 2;
    if (ans > n) return n + 1;
    x /= 2;
  }
  if (ans > n) return n + 1;
  return ans;
}
long long unsigned int calc(long long unsigned int k) {
  long long unsigned int lo = 0;
  long long unsigned int hi = 1e10;
  long long unsigned int mid;
  while (hi - lo > 1) {
    mid = (hi + lo) / 2;
    if (val(2 * mid - 1, k) >= n)
      hi = mid;
    else
      lo = mid;
  }
  if (val(2 * hi - 1, k) == n) {
    return (2 * hi - 1) * (1LL << k);
  }
  return 0;
}
int main() {
  cin >> n;
  long long unsigned int g;
  vector<long long unsigned int> ans;
  for (int i = 0; i <= 60; i++) {
    g = calc(i);
    if (g != 0) ans.push_back(g);
  }
  sort(ans.begin(), ans.end());
  for (auto x : ans) {
    cout << x << " ";
  }
  if (ans.size() == 0) cout << -1;
}
