package main

import (
	"fmt"
	"strings"
)

func main() {

	var n, c int
	var s string
	flag := true

	fmt.Scan(&n, &s)

	for flag {

		i := strings.Count(s, "#.")

		if i == 0 {
			flag = false
			break
		}

		s = strings.Replace(s, "#.", "##", 1)

		c++
	}

	fmt.Println(c)

}
