#include using namespace std; typedef long long ll; #define F first #define S second #define pii pair #define eb emplace_back #define all(v) v.begin(), v.end() #define rep(i, n) for (int i = 0; i < n; ++i) #define rep3(i, l, n) for (int i = l; i < n; ++i) #define chmax(a, b) a = max(a, b) #define chmin(a, b) a = min(a, b) #define out(a) cout << a << endl #define SZ(v) (int)v.size() #define inf (int)(1e9+7) int main() { //入力の制約を見れば10^100とかいう数字はフェイク int a, b, c; cin >> a >> b >> c; int ans = inf; rep3(i, 1, a + 10 * b + 1) rep(j, a + 1) rep(k, b + 1) { if (j == 0 && k == 0) continue; int pay = j + 10 * k; if (pay - i < 0) continue; int change = pay - i; if (a + b - j - k + change / 10 + change % 10 != c) continue; //out(i << " " << j << " " << k); chmin(ans, i); } if (ans == inf) out("Impossible"); else out(ans); }