uses crt;
var n,i:longint;s,s1:string;
{====================congsolon====================}
function add(a,b:string):string;
var i,x,y,du,s:longint;
c:string;
begin
while (length(a)<length(b)) do a:='0'+a;
while (length(a)>length(b)) do b:='0'+b;
du:=0;c:='';
for i:=length(a) downto 1 do
begin x:=ord(a[i])-48;
y:=ord(b[i])-48;
s:=x+y+du;
du:=s div 10;
c:=chr(s mod 10+48)+c;
end;
if (du>0) then c:='1'+c;
add:=c;
end;
{====================nhansolon====================}
function nhan(a,b:string):string;
var n,i,j:longint;s,t:string;
begin
n:=-1;s:='';
for i:=length(a) downto 1 do
begin n:=n+1;t:='';
for j:=1 to ord(a[i])-48 do t:=add(t,b);
for j:=1 to n do t:=t+'0';
s:=add(t,s);
end;
nhan:=s;
end;
{====================chuongtrinh====================}
begin
readln(f,n);
s1:='1';
for i:=1 to n do
begin
str(i,s);
s1:=nhan(s1,i);
end;
write(s1);
readln
end.