#include <bits/stdc++.h>
using namespace std;
set<unsigned long long> ans;
unsigned long long pw[65];
int main() {
  unsigned long long m;
  cin >> m;
  pw[0] = 1;
  for (int i = 1; i <= 59; i++) pw[i] = pw[i - 1] * 2;
  for (int i = 0; i <= 59; i++) {
    unsigned long long L = 1, R = ceil(sqrt(2.0 * (double)m) + 2);
    while (L < R) {
      unsigned long long mid = (L + R) / 2;
      if (mid * (mid - 1) / 2 + (pw[i] - 1) * mid == m) {
        if (mid % 2 == 0) break;
        ans.insert(mid * pw[i]);
        break;
      }
      if (mid * (mid - 1) / 2 + (pw[i] - 1) * mid < m)
        L = mid + 1;
      else
        R = mid;
    }
  }
  if (ans.size() == 0) {
    cout << -1 << endl;
    return 0;
  }
  for (set<unsigned long long>::iterator p = ans.begin(); p != ans.end(); p++)
    cout << *p << endl;
  return 0;
}
