import scala.io.StdIn._

object Main extends App {
  def foo(n: Int, s: String): Unit = {
    if (s.count(_ == '#') == 0) {
      println(0)
    }
    else {
      val ns = s.substring(s.indexOf('#'), s.length)
      println(ns.count(_ == '.'))
    }
  }

  foo(readInt(), readLine.toString)
}