There are containers, each initially containing exactly candies.
In one move, you take one candy from a nonempty container and put it into another container.
Find the minimum number of moves needed to make all containers contain pairwise distinct numbers of candies. Empty containers are allowed.
If this is impossible, print .
For each test case, is the minimum number of moves, or if it is impossible.