#include <bits/stdc++.h>
using namespace std;
long long po[70], ans[70];
int main() {
  long long n, i, j, x1, cnt;
  double a, b, c, x;
  cin >> n;
  po[0] = 1;
  for (i = 1; i <= 62; i++) po[i] = po[i - 1] * 2;
  cnt = 0;
  for (i = 0; i <= 61; i++) {
    a = 1.0;
    b = -1.0 + po[i + 1] - 2.0;
    c = -2.0 * n;
    if (b * b - 4.0 * a * c >= (1e-9)) {
      x = (-b + sqrt(b * b - 4.0 * a * c)) / (2.0 * a);
      x1 = (long long)x;
      for (j = max(x1 - 10, 1LL); j <= x1 + 10; j++) {
        if (j % 2 == 0) continue;
        if (j * j * 1.0 + (-1.0 + po[i + 1] - 2.0) * j > 2 * n) continue;
        if (j * j + (-1 + po[i + 1] - 2) * j == 2 * n) break;
      }
      if (j <= x1 + 2) {
        ans[cnt++] = j * po[i];
      }
      x = (-b - sqrt(b * b - 4.0 * a * c)) / (2.0 * a);
      x1 = (long long)x;
      for (j = max(x1 - 10, 1LL); j <= x1 + 10; j++) {
        if (j * j * 1.0 + (-1.0 + po[i + 1] - 2.0) * j > 2 * n) continue;
        if (j * j + (-1 + po[i + 1] - 2) * j == 2 * n) break;
      }
      if (j <= x1 + 2) {
        ans[cnt++] = j * po[i];
      }
    }
  }
  if (!cnt)
    printf("-1\n");
  else {
    sort(ans, ans + cnt);
    for (i = 0; i < cnt; i++) {
      if (i == 0 || ans[i] != ans[i - 1]) cout << ans[i] << endl;
    }
  }
  return 0;
}
