let num = Int(readLine()!)
let str = readLine()!

var prevs: String = ""
var count: Int = 0

for s in str.characters {
    if( prevs == "#" && String(s) == "." ) {
      count += 1
    }
  	prevs = String(s)
}

print( count )