#K77402. Minimum Number of Teams

    ID: 34856 Type: Default 1000ms 256MiB

Minimum Number of Teams

Minimum Number of Teams

Given an integer ( n ), determine the minimum number of teams required for a tournament such that the number of teams in each round is a power of 2. In other words, you need to compute the smallest power of 2 that is greater than or equal to ( n ).

Input: A single integer ( n ) representing the number of teams.
Output: A single integer which is the smallest power of 2 ( \geq n ).

For example, if ( n = 7 ), the output should be ( 8 ) because ( 8 = 2^3 ) is the smallest power of 2 not less than 7.

inputFormat

Input is provided from standard input (stdin) and consists of a single integer ( n ) (( 1 \leq n \leq 10^9 )).

outputFormat

Output to standard output (stdout) the smallest power of 2 that is greater than or equal to ( n ).## sample

7
8