Problems
10019 - Weekend Party
SUBMIT PROBLEM

Weekend Party

Time Limit: 1 sec

 

The Problem

Raju and his friends are enjoying their weekend party. They are sitting around the table. Now Raju wants to play a game.

Game rule is, in every minute two of them can change their places if they sit beside one another. Your task is to find out the minimum time (in minute) required for all of them to sit in reverse order so that left one would become right, and right one would become left. Means if they sit clockwise they have to sit anti-clockwise.

 

Example:

If 4 friends are sitting like 1 -> 2 -> 3 -> 4 as a circle then in


Step 1: (1 -> 4) is changed into (4 -> 1) in 1 minute
Step 2: (2 -> 3) is changed into (3 -> 2) in 1 minute

Now they sit in reverse order position 4 -> 3 -> 2 -> 1

It takes 2 steps means they need 2 minutes to sit in reverse.

 

The Input

The input file contains several lines. Each line contains a number denotes the total number of friends, N (0<N<=1000000000).  Input is terminated by EOF.

 

The Output

For each line of input, output will show the minimum time required for all of them to sit in reverse order in a separated line.

 

Sample Input

4
5
6

 

Sample Output

2
4
6

 

 

[College Level]

Inter School & College Programming Contest (ISCPC) 2015 

Problem Setter: Shaquib Mahmud