object Main extends App {
  var n = scala.io.StdIn.readInt()
  var s = scala.io.StdIn.readLine()

  val firstIndexSharp = s.indexOf("#")
  if(firstIndexSharp < 0) {
    print(0)
  } else {
    val countTarget = s.substring(firstIndexSharp, n)
    print(countTarget.count(_ == '.'))
  }
}