#include <bits/stdc++.h>
using namespace std;
const int N = 100;
long long sum[N], n;
vector<long long> rec;
int check(long long mid, long long add) {
  if (add && mid * add < add) return 1;
  if (add && mid * add < mid) return 1;
  long long cur = (mid * (mid - 1)) / 2 + mid * add;
  if (cur < mid || cur < add) return 1;
  if (cur == n)
    return 0;
  else if (cur > n)
    return 1;
  else
    return -1;
}
int main() {
  sum[0] = 0;
  sum[1] = 1;
  long long cur = 1;
  for (int i = 2; i <= 62; i++) {
    cur <<= 1;
    sum[i] = sum[i - 1] + cur;
  }
  scanf("%I64d", &n);
  for (int i = 0; sum[i] <= n; i++) {
    long long l = 1, r = sqrt(2 * n) / 2 + 2;
    while (l <= r) {
      long long mid = (l + r) >> 1;
      long long num = mid * 2 - 1;
      int ret = check(num, sum[i]);
      if (ret == 1)
        r = mid - 1;
      else if (ret == -1)
        l = mid + 1;
      else {
        rec.push_back(num * ((long long)1 << i));
        break;
      }
    }
  }
  sort(rec.begin(), rec.end());
  if ((int)rec.size() == 0) rec.push_back(-1);
  for (int i = 0; i < (int)rec.size(); i++) printf("%I64d\n", rec[i]);
  return 0;
}
