#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:16777216")
using namespace std;
vector<long long> ans;
long long n;
int main() {
  scanf("%I64d", &n);
  for (long long i = 0; i <= 63; i++) {
    if (((1LL) << i) > n + 1) break;
    long long L = 1, R = ((n + 1) / ((1LL) << i) < 2000000000LL
                              ? (n + 1) / ((1LL) << i)
                              : 2000000000LL);
    while (R >= L) {
      long long MID = (L + R) / 2, S = 0;
      if (!(MID % 2)) {
        if (MID + 1 <= R)
          MID++;
        else if (MID - 1 >= L)
          MID--;
        else
          break;
      }
      for (int j = 0; j < i; j++) S += ((1LL << j) * MID);
      S += ((MID * (MID - 1)) / 2);
      if (S == n) {
        ans.push_back(MID * (1LL << i));
        break;
      }
      if (S > n)
        R = MID - 1;
      else
        L = MID + 1;
    }
  }
  sort(ans.begin(), ans.end());
  if (!ans.size())
    puts("-1");
  else
    for (int i = 0; i < ans.size(); i++) printf("%I64d\n", ans[i]);
}
