#include using namespace std; int change(int a, int b, int p){ int ch = (a + 10 * b - p); return (ch / 10) + (ch % 10); } int main(){ cin.tie(0); ios::sync_with_stdio(false); int A,B,C; cin >> A >> B >> C; int min_p = 1000; for (int a = 0; a <= A; ++a){ for (int b = 0; b <= B; ++b){ for (int p = 1; p <= a + 10*b; ++p){ if (a == 0 and b == 0) continue; if (A - a + B - b + change(a, b, p) == C){ min_p = min(min_p, p); } } } } if (min_p == 1000){ cout << "Impossible" << endl; }else{ cout << min_p << endl; } return 0; }