object Main extends App {
  val inputs: Seq[String] = scala.io.Source.stdin.getLines().toList
  val N = inputs(0).toInt
  val S = inputs(1)

  println(solve(N,S))

  def solve(length: Int, rocks: String): Int  = {
    val result = rocks.split("#.").length - 1
    if (result <= 0) {
      0
    } else {
      result
    }
  }
}