#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 pa=0;pa<=a;pa++) { for (int pb=0;pb<=b;pb++) { int change = (pa + pb*10) - price; if (change < 0) continue; 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; }