e-olymp
favorite We need a little bit of your help to keep things running, click on this banner to learn more
Competitions

PP2. Week 1: March 1 - 7

Taxi

At the rush hour, three taxi buses drove up at the same time, following one route, where the passengers immediately got crowded. The drivers found that the number of people in taxis is different, so they decided to relocate a part of passengers so that in each minibus there will be an equal number of passengers. Determine what is the fewest number of passengers have to be relocated at the same time.

Input

Three integers not greater than 100 - the number of passengers in the first, second and third taxi bus.

Output

Print one number - the minimum number of passengers that must be relocated. If its not possible, print the word IMPOSSIBLE (with capital letters).

Time limit 1 second
Memory limit 128 MiB
Input example #1
1 2 3
Output example #1
1
Source 2018 Azerbaijan School Competition, II Stage, April 8, Problem N