#include <bits/stdc++.h>
using namespace std;
int main(void) {
  long long n, m, k;
  scanf("%I64d", &n);
  vector<long long> ans;
  for (k = 0; k < 61; k++) {
    long long L = 1, R = 2e9, M;
    while (L <= R) {
      M = (L + R) / 2;
      long long rv = M * (M - 1) / 2;
      if (rv > n)
        rv = n + 1;
      else if (((1LL << k) - 1) > n / M)
        rv = n + 1;
      else if (rv + ((1LL << k) - 1) * M > n)
        rv = n + 1;
      else if (rv + ((1LL << k) - 1) * M == n) {
        if (M % 2) {
          m = M * ((1LL << k));
          ans.push_back(m);
        }
        break;
      }
      if (rv > n)
        R = M - 1;
      else
        L = M + 1;
    }
  }
  sort(ans.begin(), ans.end());
  if (!((int)(ans).size()))
    puts("-1");
  else
    for (__typeof((ans).begin()) it = (ans).begin(); it != (ans).end(); it++)
      printf("%I64d\n", *it);
  return 0;
}
