100 #ABC089A. [ABC089A] Grouping 2

[ABC089A] Grouping 2

Score : 100100 points

Problem Statement

There are NN students in a school.

We will divide these students into some groups, and in each group they will discuss some themes.

You think that groups consisting of two or less students cannot have an effective discussion, so you want to have as many groups consisting of three or more students as possible.

Divide the students so that the number of groups consisting of three or more students is maximized.

Constraints

  • 1N10001 \leq N \leq 1000
  • All input values are integers.

Input

Input is given from Standard Input in the following format:

NN

Output

If you can form at most xx groups consisting of three or more students, print xx.

8
2

For example, you can form a group of three students and another of five students.

2
0

Sometimes you cannot form any group consisting of three or more students, regardless of how you divide the students.

9
3