program t5p4n6;
var a,b,n,d,m,k,c,e,f,k1: longint;
begin
writeln ('vvedit chislo');
readln (n);
writeln ('vvedit zifry yaky treba postavutu na pochatky');
readln (a);
writeln ('vvedit zifry yaky treba postavutu v kinzi');
readln (b);
m:=n;
d:=1;
k:=1;
repeat
m:=m div 10;
k:=k*10;
until m=0;
k1:=k div 10;
c:=(m div k1)+a;
e:=(m mod 10)+b;
f:=(((c*k)+n)*10)+e;
writeln (f);
readln
end.