The Roman Empire is at war with Carthage. Hannibal's army is composed of $a$ archers, $b$ ballistae, $c$ cavalrymen, $d$ dart-shooters, $e$ elephants and $f$ fighters.
- In each round of the battle, Scipio chooses some categories of enemy troops (between those listed above) and destroys 1 unit from each of the selected groups.
- Immediately after these units get destroyed, Hannibal restores his army with 1 unit in each of the non-attacked (in the same round) categories.
For example, if Scipio defeats 1 ballista and 1 elephant, Hannibal will displace 1 new archer, 1 cavalryman, 1 dart-shooter and 1 fighter. Of course, Scipio may also decide not to attack anything, but that might not be the best way to win the war!
Given $a,b,c,d,e,f$ can you determine the minimum number of Carthaginian troops that Scipio can leave on the combat field? Also, what's the minimum number of rounds needed to achieve such result?
For example, if $a,b,c,d,e,f$ are all equal to 6, Scipio can easily remove one element from all categories per round and leave Hannibal with 0 troops after 6 rounds.
Note: Scipio can't choose to attack a unit of a category with 0 elements. If he does, he automatically loses his honour and, consequently, the war.