fun main(args: Array<String>) {
	val n = (readLine() ?: return).toInt()
	val s = (readLine() ?: return).toCharArray()
	var count = 0
	for (i in 0 until s.size - 1) if (s[i] == '#' && s[i + 1] == '.') count++
	println(count)
}