#include <bits/stdc++.h>
using namespace std;
long long verifica(long long a) {
  long long sum = 0;
  while (a % 2 == 0 && a > 1) {
    sum = sum + a / 2;
    a = a / 2;
  }
  return sum + a * (a - 1) / 2;
}
int main() {
  long double a = 2.0, b = -2.0, aux = 1.0;
  unsigned long long c;
  cin >> c;
  vector<long long> rest;
  rest.push_back(-1);
  for (int i = 0; i < 64; i++) {
    a = 1.0 * a / 4.0;
    b = b + 2 * aux - 1.0 * aux / 2.0;
    aux = 1.0 * aux / 2;
    long double res = 1.0 * (-b + sqrt(b * b + 4 * a * c)) / (2.0 * a);
    if (res - (long long)res == 0) {
      long long api = (long long)res;
      if (verifica(api) == c) rest.push_back(api);
    }
  }
  int asd = rest.size();
  if (asd == 1) {
    cout << -1 << endl;
    return 0;
  }
  sort(rest.begin(), rest.end());
  for (int i = 1; i < asd; i++)
    if (rest[i] != rest[i - 1]) cout << rest[i] << endl;
  return 0;
}
