package test.demo; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class Yukicoder825 { public static void main(String[] args) { // TODO 自動生成されたメソッド・スタブ try { String[]str2=input(); int a=Integer.parseInt(str2[0]); int b=Integer.parseInt(str2[1]); int c=Integer.parseInt(str2[2]); if(test(a,b,c)<=0) { System.out.println("Impossible"); }else { System.out.println(test(a,b,c)); } } catch (IOException e) { } } public static int test(int a,int b, int c) { int count =a+b*10; int k=0; int en=0; if(c==0) { return a+b*10; }else { for(int i=c;i>=0;i--) { if(count-((c-i)*10+i)<=0 || ((c-i))*10+i<=0) { continue; } k=(count-((c-i)*10+i)); en=i; } if((en-a)>=10) { return -1; } return k; //(a-(c-(a/10-1+b)))%10; } } public static String[] input() throws IOException { BufferedReader br =new BufferedReader(new InputStreamReader(System.in)); String str=br.readLine(); String[]str2=str.split(" "); return str2; } }