LearnPy Hub
← Arena
EasyRating 800

Sharing with a Younger Sister

n candies are shared between two sisters so that the older gets strictly more and the younger gets at least one. In how many ways?

Input

One integer n (1 ≤ n ≤ 2·10⁹).

Output

One integer.

Sample 1

Input
7
Output
3

Sample 2

Input
1
Output
0
solution.py
Output appears here
Sharing with a Younger Sister · Python Arena problem · LearnPy Hub