#include #include #include using ll = long long; using namespace std; #define _overload3(_1, _2, _3, name, ...) name #define _rep(i, n) repi(i, 0, n) #define repi(i, a, b) for(int i = int(a); i < int(b); ++i) #define rep(...) _overload3(__VA_ARGS__, repi, _rep, )(__VA_ARGS__) int main() { int A, B, C; cin >> A >> B >> C; int t = A + 10 * B + 1; rep(i, 1, t) { rep(a, A + 1) { rep(b, B + 1) { int p = a + 10 * b; int c = p - i; if(c < 0) continue; if(C == (c / 10 + c % 10 + A - a + B - b)) { cout << i << endl; return 0; } } } } cout << "Impossible" << endl; return 0; }