#include <bits/stdc++.h>
const int MAXN = 200005;
using namespace std;
long long n, i = 1, t = 0;
long long arr[MAXN];
int an;
inline long long sqrt1(long long n) { return (long long)sqrt(n + 0.1); }
inline long long sqr(long long n) { return n * n; }
bool check(long long n) {
  long long t = sqrt1(n);
  return t * (t + 1) == n;
}
int sign(long long x, long long b, long long c) {
  long double res = (long double)x * x + (long double)b * x + (long double)c;
  if (res > 0) return 1;
  if (fabs(res) <= 1e-5) return 0;
  return -1;
}
void solve(long long b, long long c, long long t) {
  long long L = 1, R = 2 * sqrt1(n), x, ans = -1;
  while (L <= R) {
    x = (L + R) >> 1;
    int s = sign(x, b, c);
    if (!s) {
      ans = x;
      break;
    }
    if (s > 0)
      R = x - 1;
    else
      L = x + 1;
  }
  if (!sign(L, b, c)) x = L;
  if (ans == -1 || ans % 2 == 0) return;
  arr[++an] = ans * (t + 1);
}
int main() {
  cin >> n;
  if (check(n * 2) && (sqrt1(n * 2) + 1) % 2 == 1) arr[++an] = sqrt1(n * 2) + 1;
  for (t = 1; i <= n && t <= n; i *= 2, t += i) solve(2 * t - 1, -2 * n, t);
  if (!an) {
    puts("-1");
    return 0;
  }
  sort(arr + 1, arr + an + 1);
  for (int i = 1; i <= an; ++i) cout << arr[i] << '\n';
  return 0;
}
