#include <bits/stdc++.h>
using namespace std;
vector<long long int> wynik;
int main() {
  long long int n;
  cin >> n;
  int ile = 0;
  long long int pot = 1;
  if (n == 1) {
    cout << "2" << endl;
    return 0;
  }
  for (; pot <= n + 1; pot *= 2) {
    long long int k = pot - 1;
    long long int kl = 1, kp = 1000 * 1000 * 1000, aktc, faj;
    kp *= kp;
    while (kl <= kp) {
      aktc = (kl + kp) / 2;
      if (pow(double(3 * n), 0.5) < aktc || 2 * n / aktc < 2 * k - 2) {
        kp = aktc - 1;
        continue;
      }
      long long int rhs = aktc * aktc + (2 * k - 1) * aktc;
      if (2 * n == rhs) {
        if (aktc % 2 == 0) {
          break;
        }
        ile = 1;
        wynik.push_back(pot * aktc);
        break;
      }
      if (2 * n > rhs) {
        kl = aktc + 1;
      } else {
        kp = aktc - 1;
      }
    }
  }
  sort(wynik.begin(), wynik.end());
  if (ile == 0) {
    cout << "-1" << endl;
  } else {
    for (int i = 0; i < wynik.size(); i++) {
      cout << wynik[i] << endl;
    }
  }
  return 0;
}
