#include <bits/stdc++.h>
using namespace std;
const int maxn = 100 + 5;
long long f(long long x) {
  if (x % 2)
    return x * (x - 1) / 2;
  else
    return x / 2 + f(x / 2);
}
int main() {
  ios_base::sync_with_stdio(false);
  long long n;
  vector<long long> ans;
  cin >> n;
  for (int t = 0; t < 1; t++) {
    long long sum = 0;
    for (int k = 0; sum < 2 * n; k++) {
      double l = 0, r = 2 * n;
      int ITS = 100;
      for (int i = 0; i < ITS; i++) {
        double m = (l + r) / 2;
        if (m * m + (2 * sum - 1) * m - 2 * n < 0) {
          l = m;
        } else {
          r = m;
        }
      }
      double x = l;
      for (long long z = x - 5; z < x + 5; z++) {
        if (z % 2 && z * z + (2 * sum - 1) * z == 2 * n && z > 0) {
          ans.push_back((z << k));
        }
      }
      sum += (1LL << k);
    }
    sort(ans.begin(), ans.end());
    for (int i = 0; i < ans.size(); i++) {
      cout << ans[i] << endl;
    }
    if (ans.size() == 0) {
      cout << -1 << "\n";
    }
    cout << endl;
  }
  return 0;
}
