A few years ago Sajjad left his school and register to another one due to security reasons. Now he wishes to find Amir, one of his schoolmates and good friends.

There are n schools numerated from 1 to n. One can travel between each pair of them, to do so, he needs to buy a ticket. The ticker between schools i and j costs <image> and can be used multiple times. Help Sajjad to find the minimum cost he needs to pay for tickets to visit all schools. He can start and finish in any school.

Input

The first line contains a single integer n (1 ≤ n ≤ 105) — the number of schools.

Output

Print single integer: the minimum cost of tickets needed to visit all schools.

Examples

Input

2


Output

0


Input

10


Output

4

Note

In the first example we can buy a ticket between the schools that costs <image>.
'''

Notice that we could get 0 price if (i + j) == (n + 1) satisfied. 

For example we try the case with n = 10. Thus we could get folowing pairs which resulted in 0 price:
(1, 10), (2, 9), (3, 8), (4, 7), (5, 6)

If we traverse the pairs, it does not connected, right? Yet Sajjad wants to visit all school. Thus we try
next minimum price which is 1 --> ((i + j) - (n + 1)) == 1. Thus we get:

(2, 10), (3, 9), (4, 8), (5, 7)

Notice that if we combine pairs from 0 price ticket & 1 price ticket, then we could visit all school!
1, 10, 2, 9, 3, 8, 4, 7, 5, 6

Thus the minimum price to visit all school for n = 10 is (0 + 1 + 0 + 1 + 0 + 1 + 0 + 1 + 0) = (1 + 1 + 1 + 1) = 4

If try this mechanism on n = [1, 10] then we get following result:

{1: 0, 2: 0, 3: 1, 4: 1, 5: 2, 6: 2, 7: 3, 8: 3, 9: 4, 10: 4}

From this result, we could infer that the pattern is math.floor((n - 1) / 2)

'''

print((input() - 1) / 2)