Problems
Cake
Cake
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.
Input example #1
2
Output example #1
1
Input example #2
3
Output example #2
3