Taxi
Very easy
Execution time limit is 1 second
Runtime memory usage limit is 128 megabytes
At rush hour, three taxi buses arrived at the stop simultaneously, all following the same route, and passengers immediately boarded them. The drivers noticed that the number of people in the different buses varied and decided to transfer some passengers so that each bus would have the same number of passengers. Determine the minimum number of passengers that need to be transferred for this.
Input
Three integers, not exceeding — the number of passengers in the first, second, and third busses, respectively.
Output
Print a single number — the minimum number of passengers that need to be transferred. If this is impossible, print IMPOSSIBLE.
Examples
Input #1
Answer #1
Submissions 5K
Acceptance rate 32%