Problem Description

One non-negative integer n is provided (n>0). Compute the smallest integer > n that has the same number of set bits. Output it.

Input Format

One integer n.

Output Format

One integer next.

Sample Test Case

Input:
6
Output:
9

Constraints

1

Solutions (0)

No solutions submitted yet. Be the first!

Discussion (0)

No comments yet. Start the discussion!

Prev Next