PROGRAM ATCODER

implicit none
integer :: n,ans_b=0,ans_w=0,i
character(len=2*10**5) ::  s

read*, n,s

do i = 1, n
  if ( s(i:i) == '#' ) then
    ans_b = ans_b + 1
  else
    ans_w = ans_w + 1
  end if
end do

print'(i0)', min(ans_b,ans_w)

END PROGRAM ATCODER