program YingBiFanZhuan;
var
a:array[1..1000] of integer;
i,j,n:integer;
begin
assign(input,'coinn.in');
reset(input);
assign(output,'coinn.out');
rewrite(output);
readln(n);
writeln(n);
for i:=1 to n do
a[i]:=0;
for i:=1 to n do
begin
for j:=1 to n do
begin
if i<>j then
begin
if a[j]=0
then a[j]:=1
else a[j]:=0
end;
write(a[j])
end;
writeln
end;
close(input);
close(output)
end.