Codeforces Round 411 (Div. 2)
C
Find Amir
Codeforces
未评级
原题
← BD →
翻译中…

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* ≤ 10^{5}$) — the number of schools.

翻译中…

Output

翻译中…

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

翻译中…

Note

翻译中…

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

翻译中…

样例

Input #1
2
Output #1
0
InputCopy OutputCopy
Input #2
10
Output #2
4
InputCopy OutputCopy
题目信息
题号
805C
时间限制
1 s
内存限制
256 MB

题面与样例版权归 Codeforces 及出题人所有;中文翻译由 AI 生成(CI 管线),如有出入请以原文为准。