Problem G
Popcorn
Languages
da
en
The culmination of the Galactic Popcorn Festival G-Pop is undoubtedly the competitive eating event.
First, the participants are separated into four groups of equal size. Then each participants competes against every other member of the same group; the goal is to eat half a bag of popcorn faster than the opponent. The winner of each group proceeds to one of the two semi-finals. The two losers of the semi-finals then compete for third place, and finally the two winners compete for winning the entire contest.
A record number of contestants is expected this year, so the organizers need your help in computing the total number of bags of popcorn needed.
The figure below shows an example with
Input
A single integer
Output
The number of bags of popcorn needed.
Points
There are two test groups, each worth 50 points:
Group |
Points |
Constraints |
1 |
50 |
|
2 |
50 |
No further constraints on |
Sample Input 1 | Sample Output 1 |
---|---|
12 |
16 |
Sample Input 2 | Sample Output 2 |
---|---|
28 |
88 |
Sample Input 3 | Sample Output 3 |
---|---|
4 |
4 |