#include <bits/stdc++.h>
using namespace std;
long long n;
long long f(long long mid, long long x) {
  if (x > 1 and mid > n / (x - 1) + 1) return n + 1;
  if (mid * (mid - 1) / 2 > n) return n + 1;
  return mid * (x - 1) + mid * (mid - 1) / 2;
}
int main() {
  ios::sync_with_stdio(0);
  ios_base::sync_with_stdio(0);
  cin >> n;
  vector<long long> ans;
  for (long long x = 1; x <= n * 3; x *= 2) {
    long long up = 2e9, down = 0;
    while (up >= down) {
      long long mid = (up + down) / 2;
      long long play = f(mid, x);
      if (play > n)
        up = mid - 1;
      else if (play <= n)
        down = mid + 1;
      if (play == n and mid % 2 == 1) {
        ans.push_back(mid * x);
      }
    }
  }
  if (ans.size() == 0) cout << -1 << endl;
  for (int i = 0; i < ans.size(); ++i) cout << ans[i] << endl;
  return 0;
}
