let solve n = 1

let _ =
  let n = Scanf.scanf "%d\n" (fun n -> n) in
  let ar = Array.make n '.' in
  let cnt = ref 0 in
  for i = 0 to n - 1 do
    Scanf.scanf (if i <> n-1 then "%c" else "%c\n") (fun c -> ar.(i) <- c)
  done;
  for i = 0 to n - 2 do
    if ar.(i) = '#' && ar.(i+1) = '.' then (ar.(i+1) <- '#'; cnt := !cnt + 1);
  done;
  print_int !cnt
