P27301 [AtCoder] Sum of Two Integers
入门
题目描述

Problem Description

How many ways are there to choose two distinct positive integers such that their sum is equal to $ N $ (order does not matter)?

Input Format

The input is given from the standard input in the following format:

$ N $

Output Format

Output the answer.

Sample Input and Output

Sample Input #1

4

Sample Output #1

1

Sample Input #2

999999

Sample Output #2

499999

Notes/Hints

Constraints

  • $ 1 ≦ N ≦ 10^6 $
  • $ N $ is an integer.

Sample Explanation 1

The only way to choose two distinct positive integers such that their sum is $ 4 $ is to choose $ 1 $ and $ 3 $. (Choosing $ 3 $ and $ 1 $ is not distinguished from this.)

输入格式

见题面 Input 部分

输出格式

见题面 Output 部分

样例输入
4
样例输出
1