program main
 implicit none

 integer N,M,i,j
 character*200000 Str
 read(*,*) N
! allocate( Str(N) )
 read(*,*) Str
 do i=1,N
  if(Str(i:i) == '#') then
   M = i+1
   exit
  end if
 end do

 j = 0
 do i=M,N
  if(Str(i:i) == '.') then
   j = j+1
  end if
 end do

 write(*,*) j
end program main