#include <bits/stdc++.h>
#pragma warning(disable : 4996)
using namespace std;
long long n, m;
bool check(int x, int k) {
  long long tmp = 0;
  if (n / x + 1 < (1ll << k)) return 0;
  tmp += 1ll * x * (x - 1) / 2;
  if (n - tmp < ((1ll << k) - 1) * x) return 0;
  return 1;
}
int main() {
  int t, x, y, z, ca = 1;
  scanf("%I64d", &(n));
  vector<long long> ans;
  for (int i = 0; i < (int)(63); ++i) {
    if ((1ll << i) > n + 1) break;
    long long l = 1, r = (long long)2e9;
    while (l + 1 < r) {
      long long mid = l + r >> 1;
      if (!check(mid, i))
        r = mid;
      else
        l = mid;
    }
    if ((l & 1) && ((1ll << i) - 1) * l == n - 1ll * (l - 1) * l / 2)
      ans.push_back((1ll << i) * l);
  }
  if (((int)ans.size()) == 0)
    puts("-1");
  else {
    sort(ans.begin(), ans.end());
    for (int i = 0; i < (int)(((int)ans.size())); ++i)
      printf("%I64d\n", (ans[i]));
  }
  return 0;
}
