#include <bits/stdc++.h>
using namespace std;
const int N = 1005;
const long long INF = 1e18;
const long long R = 3 * 1e9;
long long S[N];
int cnt;
void Binary_Search(long long n) {
  for (int k = 0; k < 63; k++) {
    long long l = 1;
    long long r = R;
    if (k >= 30) r = INF >> k;
    while (l <= r) {
      long long m = (l + r) >> 1;
      long long ans = (((long long)1 << k) - 1) * m * 2 + m * (m - 1);
      if (ans > 2 * n)
        r = m - 1;
      else if (ans < 2 * n)
        l = m + 1;
      else {
        if (m & 1) S[cnt++] = m * ((long long)1 << k);
        break;
      }
    }
  }
}
int main() {
  long long n, x;
  cin >> n;
  cnt = 0;
  Binary_Search(n);
  sort(S, S + cnt);
  if (cnt == 0)
    puts("-1");
  else {
    for (int i = 0; i < cnt; i++) cout << S[i] << endl;
  }
  return 0;
}
