AtCoder Beginner Contest 089
翻译中…
Problem Statement
翻译中…
There are $N$ 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
翻译中…
$1 \leq N \leq 1000$- All input values are integers.
翻译中…
Input
翻译中…
Input is given from Standard Input in the following format:
翻译中…
N
翻译中…
Output
翻译中…
If you can form at most $x$ groups consisting of three or more students, print $x$.
翻译中…
样例
Input #1
8
Output #1
2
For example, you can form a group of three students and another of five students.
Input #2
2
Output #2
0
Sometimes you cannot form any group consisting of three or more students, regardless of how you divide the students.
Input #3
9
Output #3
3
题目信息
题面与样例版权归 AtCoder 及出题人所有;中文翻译由 AI 生成(CI 管线),如有出入请以原文为准。