#P9451. Counting Game with Favorite Number 2
Counting Game with Favorite Number 2
Counting Game with Favorite Number 2
In this problem, Xttttr and his npy are playing a counting game and they have a special affection for the number $2$. The game is played according to the following rules:
- If a number $a$ satisfies $\operatorname{popcount}(a) \geq 3$, it is considered illegal. In this case, the opponent must answer "No,Commander".
- If a number $a$ is legal (i.e. $\operatorname{popcount}(a) < 3$), the opponent should reply with the next legal number; that is, the smallest number strictly greater than $a$ which is legal.
Your task is to determine the correct response after a given number $a$ is called.
inputFormat
The input consists of a single integer $a$.
outputFormat
If $\operatorname{popcount}(a) \geq 3$, output "No,Commander". Otherwise, output the smallest legal number greater than $a$ (a legal number is one for which $\operatorname{popcount}(a) < 3$).
sample
1
2