#include using namespace std; int main() { int a, b, c; cin >> a >> b >> c; for (int price=1;price < a + b*10;price++) { for (int a=0;a<=20;a++) { for (int b=0;b<=20;b++) { int pa = price % 10; int pb = price / 10; int change = (a + b*10) - price; int ca = change % 10; int cb = change / 10; int rest = (a - pa + ca) + (b - pb + cb); if (rest == c) { cout << price << endl; return 0; } } } } cout << "Impossible" << endl; return 0; }