import java.util.*
import java.math.*
fun main(args: Array<String>) {

    val N = readLine()!!.toInt()
    var ans = 0
    var tmp = 0
    var isBlack = false;
    for (c in readLine()!!) {
        if (c == '#') isBlack = true
        if (c == '.' && isBlack) ans++
    }

    println(ans);
}
