program prob3
    implicit none
    integer::N,i,j,l,ans
    character(len=200005)::S
    read(*,*) N,S
    l = len_trim(S)
    ans = 0
    do i = 1, l-1
        if(S(i:i) .eq. "#" .and. S(i+1:i+1) .eq. ".") then
            ans = ans + 1
        end if
    end do
    write(*,*) ans
end program