#include <bits/stdc++.h>
using namespace std;
long long f(long long k, long long n) {
  long long l = 1, r = n / k;
  r = min(r, (long long)sqrt(n * 2.0) + 1);
  while (l < r) {
    long long m = (l + r + 1) >> 1;
    if (m * (m - 1) / 2 + k * m <= n)
      l = m;
    else
      r = m - 1;
  }
  if ((l & 1) && l * (l - 1) / 2 + k * l == n) return l * (k + 1);
  return 0;
}
vector<long long> ans;
int main() {
  long long n;
  cin >> n;
  long long x = sqrt(n * 2.0) + 1;
  for (long long t = x - 2; t <= x + 2; ++t)
    if (t > 0 && (t & 1) && t * (t - 1) / 2 == n) ans.push_back(t);
  long long k = 1;
  while (k * 2 - 1 <= n) {
    long long t = f(k * 2 - 1, n);
    if (t > 0) ans.push_back(t);
    k *= 2;
  }
  sort(ans.begin(), ans.end());
  if (ans.size())
    for (int i = 0; i < ans.size(); ++i) cout << ans[i] << endl;
  else
    puts("-1");
  return 0;
}
