program fanzhuanyingbi;
var
n,i,j:integer;
a:array[1..100]of integer;
begin
assign (input,'coinn.in');
reset (input);
assign (output,'coinn.out');
rewrite (output);
read (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
if i<>j then
if a[j]=0 then
a[j]:=1
else
a[j]:=0;
for j:=1 to n do
write (a[j]);
writeln
end;
close (input);
close (output)
end.