#include #define rep(i, n) for(int i=0; i<(n); ++i) #define rep1(i,n) for(int i=1; i<=(n); ++i) #define repi(i,a,b) for(int i=a; i<=(b); ++i) #define ALL(obj) (obj).begin(), (obj).end() #define pb push_back #define sz(v) (int)v.size() #define UNIQUE(v) v.erase( unique(v.begin(), v.end()), v.end() ); using ll = long long; using namespace std; struct aaa{aaa(){ cin.tie(0); ios::sync_with_stdio(0); cout<> a >> b >> c; vector pr; rep1(i,230){ rep(j,a+1){ rep(k,b+1){ int h = a + b - j - k; int pay = j + 10*k; if((pay - i < 10) && (pay - i) >= 0 && (h + pay - i == c)) pr.pb(i); else if(pay - i >= 10 && h + (pay-i)/10 + (pay-i)%10 == c) pr.pb(i); } } } if(pr.empty()){ cout << "Impossible" << endl; return 0; } sort(ALL(pr)); cout << pr[0] << endl; }