#include using namespace std; #define ll long long int main() { ll a,n; cin>>n; ll ans=0; for(int i=0;i>a; if(a==1) { ans+=1; } else{ for(int j=0;;j++) { ll temp=pow(2,j); if(a%temp!=0) { ll temp1=pow(2,j-1); ans+=(a/temp1)*(temp-1) + 1; break; } }} } cout<