#include <bits/stdc++.h>
using namespace std;
long long n, lo, hi, mid, val;
long long func(long long m, long long d) {
  long long val1 = (m * (m - 1)) / 2;
  long long val2 = ((1LL << d) - 1LL);
  val2 *= m;
  if (val2 / m == ((1LL << d) - 1LL)) {
    long long k = val1 + val2;
    if (k >= val1) return k;
    return 9223372036854775807;
  } else
    return 9223372036854775807;
}
long long teams(long long m, long long d) { return (1LL << d) * m; }
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cin >> n;
  set<long long> ans;
  for (long long i = 0; i <= 63; i++) {
    lo = 1, hi = 1e10 + 50;
    while (lo <= hi) {
      mid = lo + (hi - lo) / 2;
      val = func(mid, i);
      if (val < n)
        lo = mid + 1;
      else if (val > n)
        hi = mid - 1;
      else {
        if (mid & 1) ans.insert(teams(mid, i));
        break;
      }
    }
  }
  if (ans.size() == 0) {
    cout << "-1";
    return 0;
  }
  for (auto i : ans) cout << i << "\n";
  return 0;
}
