In how many ways can a natural number be written as a sum of $2$ natural numbers? For example, $7=1+6,2+5,3+4$. Hence $7$ can be written as a sum of $2$ natural numbers in $3$ ways.
 A: If $n$ is odd, it can be written as $i + (n-i)$ for $i$ from $1$ to $(n-1)/2$, thus $(n-1)/2$ ways.  If $n$ is even, it can be written as $i + (n-i)$ for $i$ from $1$ to $n/2$, thus $n/2$ ways.  The case $i=n/2$, i.e. $n = (n/2) + (n/2)$, is the sum of two natural numbers but not the sum of two distinct natural numbers.
A: Hint:
$$=|======\ ==|=====\ ===|====$$
Think of a cursor that you can move. How many positions are allowed ?
A: For any number $n\in \mathbb N$, we could write $n=1+(n-1)=2+(n-2)=\cdots=n-1+(1)$.
That is $n-1$ different ways. However, since many ways are the same — the first and last, for example — we want to exclude these.
If $n$ is odd, then the $n-1$ ways we found is an even number of ways and half of them are unique.
If $n$ is even, then $n-1$ is odd. Half of the $n-2$ solutions are unique, and the last solution is alone.
In any case, the number of ways to write $n$ this way is $\lceil \frac{n-1}{2} \rceil$, where the brackets denote rounding up to the nearest integer.
