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) != '.') {
      sum2 = sum2 + 1
    }
    if(get(i) == '.') {
      sum = sum + 1
    }
  }
  println(math.min(sum,sum2))
}