#include <bits/stdc++.h>
using namespace std;
int main(void) {
  long long k, ans, n;
  long long flag1, flag2 = 0;
  long long a[100000], cnt = 0;
  scanf("%lld", &n);
  for (long long k = 0; k <= 64; k++) {
    flag1 = 0;
    long double x = (3 - pow(2, k + 1) +
                     sqrt((pow(2, k + 1) - 3) * (pow(2, k + 1) - 3) + 8 * n)) /
                    2;
    if (x == (long long)x && ((long long)x) % 2 == 1) {
      for (long long j = 0; j < cnt; j++) {
        if (!(((long long)x << k) < a[j] || ((long long)x << k) > a[j])) {
          flag1 = 1;
          break;
        }
      }
      if (flag1) {
        continue;
      }
      long long tmp = (long long)x;
      if (((1LL << k) - 1) * tmp + tmp * (tmp - 1) / 2 == n) {
        flag2 = 1;
        a[cnt++] = (long long)x << k;
      }
    }
  }
  if (flag2 == 0) {
    printf("-1\n");
  } else {
    sort(a, a + cnt);
    for (long long k = 0; k < cnt; k++) {
      printf("%I64d\n", a[k]);
    }
  }
  return 0;
}
