#include <bits/stdc++.h>
using namespace std;
int main() {
  long long T;
  cin >> T;
  set<long long> S;
  for (int k = 0; k <= 60; k++) {
    long long A = (1LL << k) - 1;
    if (A == T)
      S.insert(1LL << k);
    else if (A < T) {
      long long lo = 1, hi = 1414213565LL;
      while (hi - lo > 1) {
        long long mid = (lo + hi) / 2;
        long long B = mid * (mid - 1) / 2;
        if (B > T)
          hi = mid;
        else {
          long long C = T - B;
          if (A < C / mid)
            lo = mid;
          else
            hi = mid;
        }
      }
      if (A * hi + hi * (hi - 1) / 2 == T && hi % 2 == 1)
        S.insert((1LL << k) * hi);
    }
  }
  vector<long long> v(S.begin(), S.end());
  if (v.size() == 0)
    cout << -1 << endl;
  else {
    for (int i = 0; i < v.size(); i++) cout << v[i] << endl;
  }
  return 0;
}
