#include <bits/stdc++.h>
using namespace std;
long long int nibun(long long int r, long long int n) {
  long long int start = 1;
  long long int end = n;
  while (true) {
    long long int i = (start + end) / 2;
    long long int m = n / i;
    if ((i - 1) / 2 + r > m) {
      if (start == end) return 0;
      if (start == end - 1) {
        end = start;
      } else {
        end = i;
      }
    } else if ((i - 1) / 2 + r == m && (n % i) == 0) {
      if ((i % 2) == 0) return 0;
      return i * (r + 1);
    } else {
      if (start == end) return 0;
      if (start == end - 1) {
        start = end;
      } else {
        start = i;
      }
    }
  }
  return 0;
}
int main() {
  long long int n;
  cin >> n;
  vector<long long int> ans;
  for (long long int i = 1; i <= n + 1; i *= 2) {
    long long int a = nibun(i - 1, n);
    if (a != 0) ans.push_back(a);
  }
  if (ans.size() == 0) {
    cout << "-1" << endl;
  } else {
    sort(ans.begin(), ans.end());
    for (int i = 0; i < ans.size(); i++) {
      cout << ans[i] << endl;
    }
  }
  return 0;
}
