#include <bits/stdc++.h>
using namespace std;
const int INF = (int)1e9;
const long long INF64 = (long long)1e18 + 5;
const long double eps = 1e-9;
const long double pi = 3.14159265358979323846;
vector<unsigned long long> arr;
int main() {
  unsigned long long n, i, L, R, mid;
  unsigned long long ans;
  unsigned long long now;
  double dnow, dmid, dans;
  while (cin >> n) {
    arr.clear();
    n *= 2ll;
    for (i = 0; i < 61; i++) {
      now = (1LL << (i + 1));
      L = 1, R = INF64;
      while (L <= R) {
        mid = (L + R) / 2LL;
        ans = (now + mid - 3LL) * mid;
        dnow = now;
        dmid = mid;
        dans = (dnow + dmid - 3.0) * dmid;
        if (ans == n) {
          if (mid % 2) arr.push_back(mid * (1LL << (i)));
          break;
        } else if (dans > n) {
          R = mid - 1LL;
        } else
          L = mid + 1LL;
      }
    }
    sort((arr).begin(), (arr).end());
    arr.resize(unique((arr).begin(), (arr).end()) - arr.begin());
    if ((int((arr).size())) == 0)
      cout << -1 << endl;
    else {
      for (i = 0; i < (int((arr).size())); i++) cout << arr[i] << endl;
    }
  }
  return 0;
}
