A. Generous Eater
time limit per test
0.5 seconds
memory limit per test
256 megabytes
input
standard input
output
standard output

You have n candies. You want to give as much to your friends as possible, but you have a problem; every time you give two friends a candy each, you can't help but eat one yourself (if you have one left). You tried to resist after giving the first one, but after giving the second, it was unbearable.

What is the maximum number of friends you can give candies to?

Input

The first line of input contains n (1 ≤ n ≤ 109), the number of candies you have.

Output

Output a single line with the maximum number of friends you can give candies to.

Examples
Input
4
Output
3
Input
5
Output
4
Input
6
Output
4