#K64892. Maximum Guests to Talk

    ID: 32076 Type: Default 1000ms 256MiB

Maximum Guests to Talk

Maximum Guests to Talk

You are given an integer n representing the number of guests seated around a circular table. Your task is to determine the maximum number of guests you can talk to under the constraint that no two consecutive guests (including the first and last guests, since the arrangement is circular) can be selected.

For the case when n >= 4, the result is determined by the formula: $$\left\lfloor \frac{n+1}{2} \right\rfloor$$.

Note that for the specific cases:

  • If n = 2 then the answer is 1.
  • If n = 3 then the answer is 2.

Implement a program to read the input from stdin and write the output to stdout.

inputFormat

The input consists of a single line containing one integer n (2 ≤ n ≤ 10^9), which represents the number of guests at the table.

Input is read from standard input.

outputFormat

Output a single integer -- the maximum number of guests you can talk to without selecting two adjacent guests.

Output should be written to standard output.

## sample
5
3

</p>