#include <bits/stdc++.h>
using namespace std;
const long long MAXN = 1e18 + 1;
long long out[100];
int cnt;
long long up;
long long cal(long long t1, long long x) {
  return x * (x - 1) / 2 + (t1 - 1) * x;
}
long long fi(long long n, long long t1) {
  long long r, l;
  l = 0;
  r = up;
  while (r - l > 1) {
    long long mid = (r + l) / 2;
    if (cal(t1, mid) == n) {
      return mid;
    } else if (cal(t1, mid) > n)
      r = mid;
    else if (cal(t1, mid) < n)
      l = mid;
  }
  up = r;
  if (cal(t1, r) == n)
    return r;
  else if (cal(t1, l) == n)
    return l;
  else if (r == 1 && l == 0)
    return 0;
  return -1;
}
int main() {
  long long n;
  scanf("%I64d", &n);
  cnt = 0;
  up = sqrt(4 * n);
  long long t1 = 1;
  while (1) {
    long long temp = fi(n, t1);
    if (temp == 0)
      break;
    else if (temp != -1 && temp % 2 != 0)
      out[cnt++] = temp * t1;
    t1 *= 2;
  }
  sort(out, out + cnt);
  if (cnt > 0) {
    for (int i = 0; i < cnt; i++) {
      if (i > 0 && out[i] == out[i - 1]) continue;
      printf("%I64d\n", out[i]);
    }
  } else
    printf("-1\n");
  return 0;
}
