program coinn;
var
n,i,j:integer;
s:string;
begin
assign(input,'coinn.in');
assign(output,'coinn.out');
reset(input);
rewrite(output);
readln(n);
writeln(n);
s:='';
for i:=1 to n do
s:=s+'0';
for i:=1 to n do{jishu 0 oushu 1}
begin
for j:=1 to n do
if s[j]='0' then s[j]:='1' else s[j]:='0';
if i mod 2=1 then begin
for j:=1 to n do
if s[j]='1' then begin
s[j]:='0';
break;
end;
end
else begin
for j:=1 to n do
if s[j]='0' then begin
s[j]:='1';
break;
end;
end;
writeln(s);
end;
close(input);
close(output);
end.