#include <bits/stdc++.h>
#pragma GCC optimize("O2")
using namespace std;
const unsigned long long MOD = 1e9 + 7, SIZE = 1e5 * 3 + 10, P = 10000,
                         P2 = 100000, MOD2 = 1e9 + 3, INF = 1e9 * 1e9;
vector<vector<unsigned long long>> grid, ans;
void down() {}
int main() {
  cin.tie(0);
  cout.tie(0);
  ios_base::sync_with_stdio(0);
  ;
  unsigned long long n;
  cin >> n;
  set<unsigned long long> ans;
  for (unsigned long long i = 0; i <= 62; i++) {
    unsigned long long l = 1, r = 1e9 * 1e9;
    unsigned long long cnt = 1;
    while (r - l > 3) {
      unsigned long long mid = (l + r) / 2, c = 0;
      if (INT64_MAX / mid < ((1ll << i) - 1)) {
        r = mid;
        continue;
      }
      if (INT64_MAX / mid < (mid)) {
        r = mid;
        continue;
      }
      cnt++;
      if (mid % 2 == 0) mid--;
      if ((mid * ((1ll << i) - 1) + (mid * (mid - 1)) / 2) <= n) {
        l = mid;
      } else {
        r = mid;
      }
      if (cnt >= 1000) break;
    }
    if (l >= 0 && (l * ((1ll << i) - 1) + (l * (l - 1)) / 2) == n) {
      ans.insert(l * (1ll << i));
    }
  }
  if (ans.size() == 0) cout << "-1";
  for (auto cur : ans) {
    cout << cur << "\n";
  }
  return 0;
}
