#include #include #include #include #include #include #include #include using namespace std; int main() { int a, b, c, r; cin >> a >> b >> c; r = a + b; if (r > c && b >= c) cout << a + (b-c)*10 << endl; else if (r > c && b < c && a <= 9) cout << r - c << endl; else if (r > c && b < c && a > 9){ if ((r - c) >= 10) cout << r - c - 9 << endl; else cout << r - c << endl; } else if (r == c && b > 0) cout << 9 << endl; else if (r < c && b < c && b > 0 && c - r < 9) cout << 9 - (c - r) << endl; else if (r <= c && c - a - b <= 9 && b > 0 && b < 10) cout << 9 - c + b + a << endl; else cout << "Impossible" << endl; }