#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #define rep(i, n) for (int i = 0; i < (int)(n); ++i) //#define cerr if(false) cerr #ifdef DEBUG #define show(...) cerr << #__VA_ARGS__ << " = ", debug(__VA_ARGS__); #else #define show(...) 42 #endif using namespace std; using ll = long long; using pii = pair; template ostream &operator<<(ostream &os, pair a) { os << '(' << a.first << ',' << a.second << ')'; return os; } template ostream &operator<<(ostream &os, vector v) { for (auto x : v) os << x << ' '; return os; } void debug() { cerr << '\n'; } template void debug(H a, T... b) { cerr << a; if (sizeof...(b)) cerr << ", "; debug(b...); } int main(){ int a,b,c; cin >> a >> b >> c; for(int i = 1; i <= a + 10 * b; i++){ for(int j = 0; j <= a; j++){ for(int k = 0; k <= b; k++){ if(j + k * 10 >= i){ int num = a - j + b - k; int t = j + k * 10 - i; num += t / 10 + t % 10; if(num == c){ cout << i << endl; return 0; } } } } } cout << "Impossible" << endl; }