program prob3
    implicit none
    integer::N,i,j,l,w,b,cnt
    character(len=200005)::S
    read(*,*) N, S
    l = len_trim(S)
    w = 0
    b = 0
    j = 0
    cnt = 0
    do i = 1, l
        if(S(i:i) .eq. ".") then
            j = i
        end if
    end do
    do i = 1, j
        if(S(i:i) .eq. ".") then
            if(cnt == 1) then
                w = w + 1
            end if
        else
            b = b + 1
            cnt = 1
        end if
    end do
    write(*,*) min(w,b)
    stop
end program