#include <bits/stdc++.h>
using namespace std;
const long long INF = 1000000000;
const double eps = 1e-8;
const int maxn = 30000;
vector<long long> ans;
int is_int(long long x) {
  long long cmp = 1;
  for (int i = (1); i <= (60); ++i) {
    cmp = cmp * 2;
    if (cmp == x) return i;
  }
  return 0;
}
long long Pow(long long x, long long y) {
  if (y == 0) return 1;
  long long ans = Pow(x, y / 2);
  ans = ans * ans;
  if (y % 2) ans *= x;
  return ans;
}
int main() {
  long long n;
  while (cin >> n) {
    ans.clear();
    int k = is_int(n + 1);
    if (k) ans.push_back(Pow(2, k));
    for (int i = (-1); i <= (61); ++i) {
      long long L = 0;
      long long R = 4000000000;
      while (L <= R) {
        long long mid = L + (R - L) / 2;
        if (((Pow(2, i + 1) - 1) * mid <= 0 && i > 10) ||
            ((mid * mid - mid) / 2 <= 0 && mid != 1)) {
          R = mid - 1;
          continue;
        }
        if ((Pow(2, i + 1) - 1) * mid + (mid * mid - mid) / 2 == n) {
          if (mid % 2 && mid > 1) {
            ans.push_back(mid * Pow(2, i + 1));
          }
          break;
        } else {
          if ((Pow(2, i + 1) - 1) * mid + (mid * mid - mid) / 2 > n ||
              (Pow(2, i + 1) - 1) * mid + (mid * mid - mid) / 2 <= 0)
            R = mid - 1;
          else
            L = mid + 1;
        }
      }
    }
    if (ans.size() == 0) {
      cout << -1 << endl;
      continue;
    }
    sort(ans.begin(), ans.end());
    for (int i = (0); i < (ans.size()); ++i) {
      cout << ans[i] << endl;
    }
  }
  return 0;
}
