#include <bits/stdc++.h>
using namespace std;
long long n;
long long getans(long long a, long long b, long long s) {
  long long mid, tmp;
  while (a < b) {
    mid = (a + b) / 2;
    tmp = mid * mid - 2 * n + s * mid;
    if (tmp == 0) {
      if (mid % 2 == 0) return -1;
      return mid;
    } else if (tmp > 0)
      b = mid - 1;
    else
      a = mid + 1;
  }
  if (a * a - 2 * n + s * a == 0 && (a & 1)) return a;
  return -1;
}
int main() {
  long long i, j;
  while (scanf("%I64d", &n) == 1) {
    long long tmp;
    long long cur = 2, p, last = 0;
    int flag = 0;
    while (1) {
      if (cur - 3 < n * 2) {
        tmp = sqrt(2 * n + 0.5);
        long long p = n * 2 / (cur - 3);
        if (p > 0 && p < tmp) tmp = p;
        p = getans(0, tmp + 3, cur - 3);
        if (p > 0 && last != cur / 2 * p) {
          printf("%I64d\n", cur / 2 * p);
          flag = 1;
          last = cur / 2 * p;
        }
      } else
        break;
      cur *= 2;
    }
    if (!flag) printf("-1\n");
  }
  return 0;
}
