Time limit
2s
Memory limit
128 MB
N people stand in a circle, holding hands in the order 1, 2, ..., N. In one swap, only two people who are currently adjacent in the circle may exchange places, and the people remain arranged in a circle after the swap.
The goal is to make the circular order exactly opposite to the initial order. Because the arrangement is circular, rotations of the same order are considered identical.
Find the minimum number of swaps needed to reverse the order.
The first line contains the number of people N (1 ≤ N ≤ 32767).
Print the minimum number of swaps needed to reverse the order.