A gardener planted trees in a single day and had to water each tree with a bucket of water. However, because it rained on the day of planting, the gardener did not water the trees that day. Instead, he began watering on some -th day after planting.
If on the last watering day, he gave each tree \frac{1}{N} of a bucket, on the day before that \frac{1}{N-1} of a bucket, and so on, and the total amount of water given to each tree did not exceed half a bucket, how many days did the gardener skip watering?
The number of trees (0 < N \leq 1\,000\,000).
Output the number of days the gardener skipped watering.
Example 3