function main(input) {
  const s = input.split(/\n/)[1]  
  var c = 0
  var f = false
  
  for (var i=0; i<s.length; i++) {
    if (s[i] === "#") {
      f = true
      continue
    }
    
    if (f && s[i] === ".") {
      c++
      
      f = true
      continue
    }
    
    f = false
  }
  
  console.log(c)
}

main(require("fs").readFileSync("/dev/stdin", "utf8"));