eolymp
bolt
Try our new interface for solving problems

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 (n1000) of guests, including the hero of the day.

Output

Print the minimum number of cuts of the cake.

Time limit 1 second
Memory limit 128 MiB
Input example #1
2
Output example #1
1
Input example #2
3
Output example #2
3
Source Stage II Ukrainian School Olympiad 2011-2012, Berdichev