#include <bits/stdc++.h>
int main(void) {
  unsigned long long n;
  scanf("%llu", &n);
  unsigned long long a[1000], s = 0;
  for (int b = 0; b <= 60; b++) {
    unsigned long long p = (1llu << b) - 1;
    unsigned long long lo = 1, hi = (unsigned long long)2e9;
    while (lo <= hi) {
      unsigned long long mid = (lo + hi) / 2;
      if ((double)mid * 2 * p > 3e18) {
        hi = mid - 1;
        continue;
      }
      unsigned long long q = mid * mid + mid * 2 * p;
      if (q == 2 * n + mid) {
        if (mid % 2) {
          a[s++] = mid * (1ll << b);
        }
        break;
      } else if (q < 2 * n + mid) {
        lo = mid + 1;
      } else {
        hi = mid - 1;
      }
    }
  }
  for (int i = 0; i < s; i++) {
    int min = i;
    for (int j = i; j < s; j++) {
      if (a[min] > a[j]) min = j;
    }
    unsigned long long t = a[min];
    a[min] = a[i];
    a[i] = t;
  }
  if (s > 0) {
    for (int i = 0; i < s; i++) {
      if (!i || a[i] != a[i - 1]) {
        printf("%llu\n", a[i]);
      }
    }
  } else {
    puts("-1");
  }
  return 0;
}
