var
a:array[1..101] of longint;
i,j,n,t,k,s,p:longint;
begin
assign(input,'mason.in');
reset(input);
readln(n);
close(input);
a[1]:=1;
k:=1;
for i:=2 to 101 do a[i]:=0;
i:=0;
while i<n do
begin
if ((i+10)<=n) then s:=10 else s:=n-i;
i:=i+s;
case s of
1:p:=2;
2:p:=4;
3:p:=8;
4:p:=16;
5:p:=32;
6:p:=64;
7:p:=128;
8:p:=256;
9:p:=512;
10:p:=1024;
end;
t:=0;
for j:=1 to k do
begin
a[j]:=a[j]*p+t;
t:=a[j] div 100000;
a[j]:=a[j] mod 100000;
end;
if (t<>0) and (k<100) then
begin
inc(k);
a[k]:=t;
end;
end;
dec(a[1]);
assign(output,'mason.out');
rewrite(output);
writeln(trunc(n*(ln(2)/ln(10))+1));
for i:=100 downto 1 do
begin
if a[i]<10000 then write('0');
if a[i]<1000 then write('0');
if a[i]<100 then write('0');
if a[i]<10 then write('0');
write(a[i]);
if i mod 10=1 then writeln;
end;
close(output);
end.