program chandelier;
{$APPTYPE CONSOLE}
var
  f:text;
  i,max,ErC,x:integer;
  s:string;
begin
  Assign(f,'chandelier.in');
  Reset(f);
  Readln(f,s);
  Close(f);
  //solve
  max:=0;
  For i:=1 to length(s) do
  begin
    val(s[i],x,ErC);
    If ErC=0 then
      max:=x;
  end;
  //output
  Assign(f,'chandelier.out');
  Rewrite(f);
  Writeln(f,max+1);
  Writeln(f,s);
  Close(f);
end.
 