var s,n:comp;c:char;begin repeat read(s);repeat read(c,n);s:=s*n;until eoln;writeln(s)until 1=0end.