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