#include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; using lint = long long; using ld = long double; using pint = pair; using plint = pair; #define MOD 1000000007LL #define INF 1000000000LL #define EPS 1e-10 #define FOR(i,n,m) for(lint i=n;i<(int)m;i++) #define REP(i,n) FOR(i,0,n) #define DUMP(a) REP(d,a.size()){cout<> a >> b >> c; lint ans = INF * INF; FOR(i, 1, 10 * b + a + 1) { REP(j, a + 1) REP(k, b + 1) { int diff = 10 * k + j - (10 * b + a); if(diff < 0) continue; int rem = (a - j) + (b - k) + diff / 10 + diff % 10; if(rem == c) ans = min(ans, i); } } if(ans = INF * INF) cout << "Impossible" << endl; else cout << ans << endl; return 0; } /* --------------------------------------- */