An Animal Contest 2 P0 - Koala Matchmaking

View as PDF

Points: 3
Time limit: 0.5s
Memory limit: 256M

Authors:
Problem type

Contrary to common belief, Koalas are very socially active. Ken Koala has been on many matchmaking sites, and is now interested in making his own matchmaking algorithm. Ken's algorithm takes in a koala's favourite number, , and chooses an optimal integer such that the average of and , denoted by , is an integer and is maximal. The Koala with favourite number will be matched with a Koala with favourite number .

Given the inputted value of , you are to find the value of the integer, .

Input Specification

The input will contain an integer .

Output Specification

Output the value of the integer .

Sample Input

15

Sample Output

14

Explanation for Sample

The optimal to choose is , resulting in an average of .