#include <bits/stdc++.h>
using namespace std;
long long n;
bool check(int x, long long y) {
  if (n * 2 / x < x + y) return true;
  if (n * 2 / x > x + y) return false;
  return n * 2 <= x * (x + y);
}
long long calc(long long y) {
  int l = 1, r = 2e9, mid;
  while (l < r) {
    mid = (l >> 1) + (r >> 1) + (l & r & 1);
    if (check(mid, y - 3))
      r = mid;
    else
      l = mid + 1;
  }
  if ((r + y - 3) * r != 2 * n || 0 == (r & 1)) return -1;
  return r * y / 2;
}
int main() {
  bool ok = false;
  cin >> n;
  for (int i = 1; i <= 62; ++i) {
    long long res = calc(1LL << i);
    if (~res) {
      ok = true;
      printf("%I64d\n", res);
    }
  }
  if (!ok) puts("-1");
  return 0;
}
