| 2023 USP Try-outs |
|---|
| Закончено |
Hi, welcome to Guadalajara! The first Latin American ICPC final is about to begin. After participating as a contestant for years today you will help the organization. You remember the rules, right? Each team has at most 3 people. Each team should have exactly one printed contest.
We have $$$n$$$ contestants subscribed, but we don't know how the teams are organized. Depending on how many teams we have we will need to print more or fewer contests. Even though the contest is in black and white you know how printers always complain about being low on cyan, so you want to know what the minimum number of contests printed you will need among all possible team divisions.
One integer $$$1 \leq n \leq 10^9$$$.
Among all possible team divisions, what is the minimum number of contests that should be printed.
6
2
8
3
1923022
641008
For the second test case, we could have 8 teams, each one with one participant, and then we would need to print 8 contests. We could have 4 teams, each one with two participants, and we would need 4 printed contests. We could have 3 teams, two teams with three participants and one team with two contestants, in this case, we would need only three printed contests. It is possible to show that the last division is the one that minimizes the number of printed contests.
| Название |
|---|


