#include using namespace std; typedef long long int ll; typedef pair pll; #define FOR(i, n, m) for (ll(i) = (m); (i) < (n); ++(i)) #define REP(i, n) FOR(i, n, 0) #define OF64 std::setprecision(10) const ll MOD = 1000000007; const ll INF = (ll)1e15; int main() { ll A, B, C; cin >> A >> B >> C; ll sum = A + B * 10; FOR(i, sum + 1, 1) { bool e = false; { //! Aを10枚未満 ll a = std::min(i % 10, A); ll b = std::min(i / 10, B); if (a + b * 10 == i && (A - a) + (B - b) == C) e = true; } if (A >= 10) { //! Aを10枚両替する ll a = std::min(i % 10, A - 10); ll b = std::min(i / 10, B + 1); if (a + b * 10 == i && (A - a - 10) + (B + 1 - b) == C) e = true; } if (A == 20) { ll b = std::min(i / 10, B + 2); if (b * 10 == i && B + 2 - b == C) e = true; } if (e) { cout << i << endl; return 0; } } cout << "Impossible" << endl; return 0; }