class Main
{
{
java.
util.
Scanner i
= new java.
util.
Scanner(System.
in); int b1 = i.nextInt();
int b2 = i.nextInt();
int b3 = i.nextInt();
if ((b1 + b2 + b3) % 3 != 0) {
System.
out.
println("IMPOSSIBLE"); }
else {
int average; // среднее арифметическое
int count = 0; // наименьшее количество пассажиров, которое требуется пересадить
average = (b1 + b2 + b3) / 3;
if (b1 > average) count += b1 - average;
if (b2 > average) count += b2 - average;
if (b3 > average) count += b3 - average;
}
}
}
Y2xhc3MgTWFpbgp7CglwdWJsaWMgc3RhdGljIHZvaWQgbWFpbiAoU3RyaW5nW10gYXJncykgdGhyb3dzIGphdmEubGFuZy5FeGNlcHRpb24KCXsKCQlqYXZhLnV0aWwuU2Nhbm5lciBpID0gbmV3IGphdmEudXRpbC5TY2FubmVyKFN5c3RlbS5pbik7CgkJaW50IGIxID0gaS5uZXh0SW50KCk7CgkJaW50IGIyID0gaS5uZXh0SW50KCk7CgkJaW50IGIzID0gaS5uZXh0SW50KCk7CgkJaWYgKChiMSArIGIyICsgYjMpICUgMyAhPSAwKSB7CgkJCVN5c3RlbS5vdXQucHJpbnRsbigiSU1QT1NTSUJMRSIpOwoJCX0KCQllbHNlIHsKCQkJaW50IGF2ZXJhZ2U7IC8vINGB0YDQtdC00L3QtdC1INCw0YDQuNGE0LzQtdGC0LjRh9C10YHQutC+0LUKCQkJaW50IGNvdW50ID0gMDsgLy8g0L3QsNC40LzQtdC90YzRiNC10LUg0LrQvtC70LjRh9C10YHRgtCy0L4g0L/QsNGB0YHQsNC20LjRgNC+0LIsINC60L7RgtC+0YDQvtC1INGC0YDQtdCx0YPQtdGC0YHRjyDQv9C10YDQtdGB0LDQtNC40YLRjAoJCQlhdmVyYWdlID0gKGIxICsgYjIgKyBiMykgLyAzOwoJCQlpZiAoYjEgPiBhdmVyYWdlKSBjb3VudCArPSBiMSAtIGF2ZXJhZ2U7CgkJCWlmIChiMiA+IGF2ZXJhZ2UpIGNvdW50ICs9IGIyIC0gYXZlcmFnZTsKCQkJaWYgKGIzID4gYXZlcmFnZSkgY291bnQgKz0gYjMgLSBhdmVyYWdlOwoJCQlTeXN0ZW0ub3V0LnByaW50bG4oY291bnQpOwoJCX0KCX0KfQ==