#include #include #include #include using namespace std; typedef long long ll; setst; ll lowbit(ll x) { return x&(-x); } ll get(ll x) { x++; for(ll i=2;i<=x;i<<=1) { st.insert(i-1); } } void dfs(ll n) { st.insert(n); if(n==1) return ; ll i,l,r; for(i=62;i>=0;i--) { if((1ll<>1; l+=min(n-(1ll<