fun main(args: Array<String>) {
    val n = readLine()!!
    val s = readLine()!!.split("").toTypedArray()
    var count = 0

    s.forEachIndexed{index, i ->
        if(i == "#" && s[index+1] == ".") {
            s[index+1] = "#"
            count += 1
        }
    }

    println(count)
}
