using static System.Math; using System; public class Hello { static void Main() { string[] line = Console.ReadLine().Trim().Split(' '); var a = int.Parse(line[0]); var b = int.Parse(line[1]); var c = int.Parse(line[2]); getAns(a, b, c); } static void getAns(int a, int b, int c) { var ans = 1000; for (int i = 0; i <= a; i++) for (int j = 0; j <= b; j++) { var pay = i + 10 * j; if (pay >= 1) { for (int k = 0; k <= pay - 1; k++) { var change = getChange(k); var t = a + b - i - j + change; if (t == c) ans = Min(ans, pay - k); } } } if (ans == 1000) Console.WriteLine("Impossible"); else Console.WriteLine(ans); } static int getChange(int a) => a - a / 10 * 9; }