program main
  implicit none
  integer ::le,i,j,counter=0
  character(100000) n
  read(*,*)j
  read(*,*)n
  le=len_trim(n)
  do i=1,le-1
     if(n(i:i)=='#' .and. n(i+1:i+1)=='.')counter=counter+1
  enddo
  write(*,*)counter
end program main
