#include <bits/stdc++.h>
using namespace std;
const long long INF = 1LL << 62;
long long mul(long long a, long long b) {
  if (b == 0) return 0;
  if (a > INF / b) return INF;
  return min(INF, a * b);
}
int main() {
  long long n;
  cin >> n;
  vector<long long> ans;
  for (int k = 0; k <= 60; ++k) {
    long long pw = 1LL << k;
    long long L = 0, R = 1LL << 61;
    while (L + 1 < R) {
      long long M = (L + R) >> 1;
      long long t = mul(pw - 1, M) + mul(M, M - 1) / 2;
      if (t > n)
        R = M;
      else
        L = M;
    }
    if ((pw - 1) * L + L * (L - 1) / 2 == n && L % 2 == 1) {
      ans.push_back(pw * L);
    }
  }
  if (ans.empty()) ans.push_back(-1);
  sort(ans.begin(), ans.end());
  for (int i = 0; i < ans.size(); ++i) {
    cout << ans[i] << endl;
  }
}
