Problem: On a distant island, a valiant knight must face dragons with several heads and tails. With a sword, the knight can cut off either: one head, two heads, one tail or two tails.
But these dragons have magical powers: cut off one head, and he will instantly regrow another one; cut off one tail, and he will regrow back two! On the other hand, if you cut off two heads with a single sword strike, nothing grows back... but two tails cut off at once are replaced by a new head. Of course, a dragon is only completely dead when it has no head or tail left.
How do you kill a magical dragon with 5 heads and 7 tails?
Are there any immortal dragons? Which ones?