#include #include #include #include #include #include #include #include #include #include #include #include using namespace std; using ll = long long; int main(){ ll N; cin >> N; vector ans; if (N == 0){ cout << -1 << endl; return 0; } for (int i=40; i>=0; i--){ if ((N >> i) % 2 != ans.size() % 2) ans.push_back((1LL<