Skip to main content
Tuesday (24.11.2026) at 20:00: ALGOR Contest: Round #4 (Special Challenge) starts!

~/algor $ cat problems/integer-kitob-varagi

Book sheet

Easy 1000 ms 64 MB 18%
Share

The pages of a book are numbered from $1$, and each sheet holds two pages: pages $1$ and $2$ are on sheet $1$, pages $3$ and $4$ on sheet $2$, and so on. Find which sheet page $p$ is on.

How the sheets and pages of a book are arranged

Input

One positive integer $p$.

Output

One positive integer — the sheet number.

Note

$1 \le p \le 10^{9}$

Examples

Input #1
5
Output #1
3
Input #2
2
Output #2
1

Sign in to submit a solution

Signing up is free and takes a minute.