fun main(args: Array<String>) {
    val n = readLine()!!.toInt()
    var a = readLine()!!
    var cnt = 0
    for (i in 0 until n - 1) {
        println(a[i])
        if (a[i] == '#' && a[i + 1] == '.') {
            cnt ++
        }
    }
    println(cnt)
}