PROGRAM ATCODER

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

read*, n,s

do i = 1, n-1
  if ( s(i:i+1) == '#.' ) then
    ans = ans + 1
  end if
end do

print'(i0)', ans

END PROGRAM ATCODER