#include using namespace std; #include using namespace atcoder; using ll=long long; using ld=long double; using ull=unsigned long long; using pii=pair; using pll=pair; using mint=modint998244353; const ll INF=1ll<<60; ll f(ull x){ if(x==0)return 0; else if(x%2)return 2*f((x-1)/2)+(x+1)/2; else return f(x-1)+popcount(x); } int main(){ int T; cin>>T; while(T--){ ull N; cin>>N; cout<