시간 제한메모리 제한제출정답맞힌 사람정답 비율
1 초 512 MB54718714138.950%

문제

bobo has $n$ integers $1, 2, \dots, n$ and uses them to play a game.

He would like to choose a subset $S$ of $\{1, 2, \dots, n\}$ such that for all $x \in S$, $(2x + 2) \notin S$.

Now he is curious about the maximum size of $S$.

입력

The first line contains an integer $n$ ($1 \leq n < 10^{100})$.

출력

A single integer denotes the maximum size.

예제 입력 1

4

예제 출력 1

3

예제 입력 2

10000000000

예제 출력 2

6666666667