let () = Scanf.scanf "%d\n%s" @@ fun n s ->
  Printf.printf "%d\n" @@ fst @@ Array.fold_left (fun (acc, c) c' ->
    if c = '#' && c' = '.' then (acc + 1, '#') else (acc, c')) (0, '.') @@
  Array.init n (String.get s)

