#include <bits/stdc++.h>
using namespace std;
vector<long long> ans;
long long calc(long long x) {
  long long res = 0;
  while (x % 2 == 0) {
    res += x / 2;
    x /= 2;
  }
  res += x * (x - 1) / 2;
  return res;
}
int main() {
  long long N;
  cin >> N;
  for (int i = 0; (((long long)1) << (i)) <= N * 2; i++) {
    double A = 0.5f;
    double B = (((long long)1) << (i)) - 1.5f;
    double C = -N;
    double delt = ((B) * (B)) - 4 * A * C;
    if (delt < 0.0) continue;
    double k;
    k = (-B + sqrt(delt)) / (2 * A);
    long long x = round(k) * ((long long)1 << (i));
    if (x > 0 && calc(x) == N) ans.push_back(x);
    k = (-B - sqrt(delt)) / (2 * A);
    x = round(k) * ((long long)1 << (i));
    if (x > 0 && calc(x) == N) ans.push_back(x);
  }
  sort(ans.begin(), ans.end());
  if (ans.size() == 0)
    printf("-1\n");
  else {
    int sz = ans.size();
    long long pre = -1;
    for (int i = 0; i < sz; i++) {
      if (ans[i] != pre) cout << ans[i] << endl;
      pre = ans[i];
    }
  }
  return 0;
}
