{
Written by Fyodor Menshikov 07.02.2004
}
{$R+,Q+,S+}
uses
   SysUtils;
type
   str80=string[80];
const
   n=33;
var
   a:array[1..n]of integer;
   lines:array[1..40000]of str80;
   lastline:integer;

   procedure go(place,rest,min:integer);
   var
      i,j:integer;
      s:str80;
      written:array[1..n]of boolean;
   begin
      if (rest=0)and(place>2) then begin
         for i:=1 to place-1 do
            written[i]:=false;
         s:='';
         for i:=1 to place-1 do begin
            repeat
               j:=random(place-1)+1;
            until not written[j];
            written[j]:=true;
            if i<place-1 then
               s:=s+inttostr(a[j])+'+'
            else
               s:=s+inttostr(a[j]);
         end;
         inc(lastline);
         lines[lastline]:=s;
      end
      else if rest>=min then begin
         for i:=rest downto min do begin
            a[place]:=i;
            go(place+1,rest-i,i);
         end;
      end;
   end;

   procedure mix;
   var
      i,j:integer;
      t:str80;
   begin
      for i:=lastline downto 2 do begin
         j:=random(lastline)+1;
         t:=lines[i];
         lines[i]:=lines[j];
         lines[j]:=t;
      end;
   end;

   procedure show;
   var
      i:integer;
   begin
      writeln(n);
      for i:=1 to lastline do
         writeln(lines[i]);
   end;

begin
   randomize;
   lastline:=0;
   go(1,n,1);
   mix;
   show;
end.