S:string; i, k, a:integer; begin readln(s); if length(s)=3 then begin for i:=1 to length(s) do if s[i]='1' then begin val(s, a); a:=a*2; end else begin val(s, a); a:=a*a; end; end else writeln('ошибка'); writeln(a); readln; end.