object Main extends App {
  var a = readInt
  var get = readLine
  var sum = 0
  var check = 0
  if(a>1){
  for(i <- 0 to get.size - 1){
    if(get(i) == '#') {
      check = 1
    } else if (check == 1 && get(i) != '#'){
      sum = sum + 1
    } else {
      check = 0
    }
  }
  }
  println(sum)
}