var a  :char;
    s  :array[0..200010]of integer;
    n,i,j,k,ans  :integer;
    
function min(a,b:integer):integer;
begin
  if a>b then min:=b
  else min:=a
end;

begin
  readln(n);
  s[0]:=0;
  for i:=1 to n do begin
    read(a);
    if a='#' then s[i]:=s[i-1]+1
    else s[i]:=s[i-1];
    end;
  ans:=210000;
  j:=ans;
  for i:=2 to n do begin
    if s[i]=s[i-1] then begin
      j:=s[i]+n+s[i]-i-s[n];
      ans:=min(ans,j)
    end
    end;
    writeln(ans);
    for i:=1 to n do write(s[i])
end.