function main(input) {
  const [N, S] = input.split("\n")
  var counter = 0
  for (var i = 0; i < S.length; i++) {
    if (S[i] === "." && S[i-1] === "#") {
      counter = counter+1
    }
  }
  console.log(counter);
}
