#define rep(i,n) for(int i=0;i<(int)(n);i++) #define ALL(v) v.begin(),v.end() typedef long long ll; #include using namespace std; vector divisor(ll x){ set s; for(ll i=1;i*i<=x;i++){ if(x%i==0){ s.insert(i); s.insert(x/i); } } vector res; for(auto y:s) res.push_back(y); return res; } int main(){ ios::sync_with_stdio(false); std::cin.tie(nullptr); ll n; cin>>n; if(n==0){ cout<<-1<> A; A.push_back({1,1}); A.push_back({3,2}); A.push_back({4,3}); ll tmp=4; for(int i=3;i<=31;i++){ tmp*=2; vector B=divisor(tmp-1); ll sum=accumulate(ALL(B),0LL); A.push_back({sum,tmp-1}); } vector ANS; for(int i=31;i>=0;i--){ if(n&(1<