function main(input) {
  const S = input.split("\n")[1];
  const i = S.indexOf("#");
  console.log((i === -1) ? 0 : S.slice(i).split(/\./gm).length - 1);
}
main(require("fs").readFileSync("/dev/stdin", "utf8").trim());
