fun main(args: Array<String>) {
    val n = readLine()!!.toInt()
    val s = readLine()!!

    val white = s.filter { it == '.' }.count()
    val black = n - white

    println(Math.min(white, black))
}