fn read_vec<T: std::str::FromStr>() -> Vec<T> {
    let mut s = String::new();
    std::io::stdin().read_line(&mut s).ok();
    s.trim()
        .split_whitespace()
        .map(|e| e.parse().ok().unwrap())
        .collect()
}

fn get<T: std::str::FromStr + Clone>() -> T {
    let line = read_vec::<T>();
    line[0].clone()
}

fn main() {
    let _n = get::<usize>();
    let s = get::<String>();

    let mut black = 0;
    let mut white = 0;

    for c in s.chars() {
        if c == '#' {
            black += 1;
        } else {
            white += 1;
        }
    }

    println!("{}", std::cmp::min(black, white));
}
