package main

import (
	"fmt"
)

func main() {
	var n int
	var s string
	fmt.Scan(&n, &s)

	const white, black = ".", "#"
	before := "."
	count := 0
	for _, value := range s {
		str := string(value)
		if before == black && str == white {
			count++
			str = black
		}
		before = str
	}

	fmt.Print(count);
}