CF959E Mahmoud and Ehab and the xor-MST

Description

Ehab is interested in the bitwise-xor operation and the special graphs. Mahmoud gave him a problem that combines both. He has a complete graph consisting of $ n $ vertices numbered from $ 0 $ to $ n-1 $ . For all $ 0

Input Format

The only line contains an integer $ n $ $ (2

Output Format

The only line contains an integer $ x $ , the weight of the graph's minimum spanning tree.

Explanation/Hint

In the first sample: ![](https://cdn.luogu.com.cn/upload/vjudge_pic/CF959E/da1dd366c44de9a7fa58c6a7748f6a57cd6a4b83.png) The weight of the minimum spanning tree is 1+2+1=4.