#include <bits/stdc++.h>
#define WHOLE(v) (v).begin(), (v).end()
#define REV_WHOLE(v) (v).rbegin(), (v).rend()
using i64 = int64_t;
using namespace std;
int main() {
    i64 A, B;
    cin >> A >> B;
    cout << ((A - B) & 1 ? "IMPOSSIBLE" : to_string((A + B) / 2)) << endl;
    return 0;
}