#C1853. Distinct Sum Pairs
Distinct Sum Pairs
Distinct Sum Pairs
Given an integer n, count the number of ways to represent n as a sum of two distinct positive integers. In mathematical terms, find the number of pairs \( (a, b) \) such that:
\( a + b = n \) and \( a \neq b \), where \( a, b \in \mathbb{Z}^+ \).
Note: The order of the pair does not matter; for example, \( (1,4) \) and \( (4,1) \) are considered the same pair.
inputFormat
The input is provided via standard input (stdin) and consists of a single integer n on one line, representing the number for which you need to count the distinct sum pairs.
outputFormat
Output a single integer to standard output (stdout), representing the number of distinct pairs of positive integers \( (a, b) \) satisfying \( a + b = n \) and \( a \neq b \).
## sample5
2