#include #include #include using namespace std; namespace mp = boost::multiprecision; main(){ mp::cpp_int x; cin >> x; mp::cpp_int ans = 0, t = 0; while (x){ t += x; if(ans < t + x) { ans = t + x; } x /= 2; } if(ans