Route taxi
During rush hour, three minibuses on the same route arrived at a stop simultaneously, and passengers quickly filled them. The drivers noticed that each minibus had a different number of passengers and decided to redistribute them so that each minibus would have an equal number of passengers. Your task is to determine the minimum number of passengers that need to be moved to achieve this balance.
Input Data:
You will be given three natural numbers, each not exceeding 100. These numbers represent the number of passengers in the first, second, and third minibuses, respectively.
Output Data:
Output a single number representing the minimum number of passengers that need to be transferred. If equal distribution is not possible, output the word IMPOSSIBLE in uppercase letters.