Cake
Very easy
Execution time limit is 1 second
Runtime memory usage limit is 128 megabytes
On his birthday Peter bought a beautiful and delicious cake, that had a perfectly round shape. Peter did not know how many guests will come to his birthday, so had to develop an algorithm to cut quickly the cake into n equal parts. Keep in mind that cuts can be made either on the radius or diameter.
Help Peters to solve this problem by determining the minimum number of cuts of the cake for a given number of guests.
Input
Contains the number n (n ≤ 1000) of guests, including the hero of the day.
Output
Print the minimum number of cuts of the cake.
Examples
Input #1
Answer #1
Input #2
Answer #2
Submissions 5K
Acceptance rate 37%