#include //#include using namespace std; using ll = long long; int main() { ll n; cin >> n; ll a,b,c; a=b=c=0; for(int bit = 0;bit<40;bit++){ if(n>>bit&1){ a += 1LL<