#include using namespace std; typedef long long ll; #define rep(i, n) for(ll i = 0, i##_len = (n); i < i##_len; i++) #define reps(i, s, n) for(ll i = (s), i##_len = (n); i < i##_len; i++) #define rrep(i, n) for(ll i = (n) - 1; i >= 0; i--) #define rreps(i, e, n) for(ll i = (n) - 1; i >= (e); i--) #define all(x) (x).begin(), (x).end() #define sz(x) ((ll)(x).size()) #define len(x) ((ll)(x).length()) int main() { cin.tie(0); ios::sync_with_stdio(false); // ifstream in("input.txt"); // cin.rdbuf(in.rdbuf()); ll a, b, c; cin >> a >> b >> c; if ((a + b + 9) < c) { cout << "Impossible" << endl; return 0; } if ((b == 0) && (a <= c)) { cout << "Impossible" << endl; return 0; } set rem; ll c10 = c, c1 = 0; while(c10 >= 0) { rem.insert(c10 * 10 + c1); c10--; c1++; } auto it = rem.lower_bound(a + b * 10); it--; cout << (a + b * 10 - *it) << endl; return 0; }