import std.algorithm;
import std.array;
import std.container;
import std.conv;
import std.math;
import std.numeric;
import std.range;
import std.stdio;
import std.string;
import std.typecons;

void scan(T...)(ref T a) {
    string[] ss = readln.split;
    foreach (i, t; T) a[i] = ss[i].to!t;
}
T read(T)() { return readln.chomp.to!T; }
T[] reads(T)() { return readln.split.to!(T[]); }
alias readint = read!int;
alias readints = reads!int;

void calc(int a, int b) {
    int d = abs(a - b);
    if (d % 2 == 1) {
        writeln("IMPOSSIBLE");
        return;
    }
    writeln(min(a, b) + d / 2);
}

void calc2(int a, int b) {
    if (a % 2 != b % 2) {
        writeln("IMPOSSIBLE");
        return;
    }
    writeln((a + b) / 2);
}

void main() {
    int a, b; scan(a, b);
    calc2(a, b);
}
