const n = Number(input[0]);
const s = input[1];
let result = 0;
if (s.length < 2) {
    console.log(result);
} else {
    for (let i = 1; i < s.length; i++) {
        const char = s[i];
        const prevChar = s[i - 1];
        if (prevChar === "#" && char === ".") {
            result++;
        }
    }
    console.log(result);
}
