#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int n;
  cin >> n;
  vector<long long int> ans;
  for (int i = 0; i <= 60; i++) {
    long long int temp = pow(2, i) - 1;
    long long int mid, high = 1e10, low = 0;
    while (low <= high) {
      mid = (low + high) / 2;
      long long int val;
      val = mid - 1;
      val = val * mid;
      val = val / 2;
      if (temp != 0 && mid > (LLONG_MAX) / (temp)) {
        val = LLONG_MAX;
      } else {
        val = val + temp * mid;
      }
      if (val == n) {
        if (mid & 1) {
          ans.push_back(mid * (temp + 1));
        }
        break;
      } else if (val < n) {
        low = mid + 1;
      } else {
        high = mid - 1;
      }
    }
  }
  if (ans.size() == 0) {
    cout << "-1" << endl;
  } else {
    sort(ans.begin(), ans.end());
    for (auto uj : ans) {
      cout << uj << endl;
    }
  }
}
