var a,b:char;
    u:array[0..200010]of integer;
    n,i,j,maxb,ans,min:integer;
begin
  readln(n);
  u[0]:=0;
  for i:=1 to n do begin
    read(a);
    if a='#' then u[i]:=u[i-1]+1
    else u[i]:=u[i-1];
  end;
  maxb:=u[n];
  ans:=210000;
  for i:=1 to n do begin
    if (u[i]=u[i-1])and(u[i]<n-i-(maxb-u[i]))then begin
      
    end;
      
  end;