import scala.io.{StdIn => in}

object Main extends App {
  val n = in.readInt
  val s = in.readLine.toArray
  var cnt = 0

  for(i <- 0 until n-1) {
    if(s(i)=='#' && s(i+1) == '.'){
      cnt += 1
      s(i+1) = '#'
    }
  }

  println(cnt)
}