#[allow(unused_imports)]
use itertools::Itertools;
use proconio::input;
#[allow(unused_imports)]
use proconio::marker::*;

fn main() {
    input! {
        _n: usize,
        mut s: Chars,
    }
    s.reverse();
    while matches!(s.last(), Some(&c) if c == '.') {
        s.pop();
    }

    println!("{}", s.iter().filter(|&c| *c == '.').count());
}
