import scala.io.StdIn._

object Main extends App {
  val n = readInt
  val s = readLine.toString
  if (s.count(_ == '#') == 0)
    println(0)
  val ns = s.substring(s.indexOf('#'), s.length - 1)
  println(ns.count(_ == '.'))
}