Barrel
Easy
Execution time limit is 1 second
Runtime memory usage limit is 64 megabytes
Using two containers with capacities of 3 liters and 5 liters, you need to collect $M` liters of water in a 100-liter barrel, with the total number of pours into and out of the barrel minimized. For example, to collect 7 liters of water: pour 5 liters into the barrel twice, then remove 3 liters once, for a total of three pours.
Input
A non-negative integer .
Output
The solution to the problem.
Examples
Input #1
Answer #1
Submissions 4K
Acceptance rate 18%