#include <bits/stdc++.h>
using namespace std;
long long n;
vector<long long> ans;
int main() {
  cin >> n;
  long long k = 0;
  while ((1LL << k) - 1 <= n) {
    long long d = (1LL << k) - 1;
    long long l = 1, r = 1;
    while (r * (r - 1) / 2 + r * d <= n) r *= 2;
    while (r - l > 1) {
      long long mid = (l + r) / 2;
      if (mid * (mid - 1) / 2 + mid * d > n)
        r = mid;
      else
        l = mid;
    }
    long long t = k;
    while (l % 2 == 0) l /= 2, t++;
    if (l * (l - 1) / 2 + l * ((1LL << t) - 1) == n)
      ans.push_back((1LL << t) * l);
    k++;
  }
  sort(ans.begin(), ans.end());
  if (ans.empty()) ans.push_back(-1);
  for (int i = 0; i < ans.size(); i++)
    if (i == 0 || ans[i] > ans[i - 1]) cout << ans[i] << endl;
  return 0;
}
