var s:string;n:comp;begin repeat readln(s);if"09">s then s:="8#"+s;if"1">s then s[1..2]:=" $";readstr(s,n);writeln(n)until 1=0end.