#![allow(unused, non_snake_case, dead_code, non_upper_case_globals)]
use {
    proconio::{marker::*, *},
    std::{cmp::*, collections::*, mem::*},
};
fn main() {
    input! {//
        n:usize,
        s:Chars,
    }

    let mut start = 0;
    while start < n && s[start] == '.' {
        start += 1;
    }
    let mut ans = 0;
    for i in start..n {
        if s[i] == '.' {
            ans += 1;
        }
    }
    println!("{}", ans);
}
