#54553: 魔法小公式


king960129@gmail.com (吳瑞宸)


特判 input==1
else:
  cout<<N*2-pow2(ceil(log2(N)))<<'\n';

// pow2(N)為自訂函式等價pow(2,N)但速度快非常多