package main

import "fmt"

func main() {
	var n int
	var bs []byte
	w := []byte(".")[0]
	b := []byte("#")[0]
	fmt.Scan(&n, &bs)
	ans := 0
	start := false
	for _, v := range bs {
		if start == true {
			if v == w {
				ans++
			}
		}
		if v == b {
			start = true
		}
	}
	fmt.Println(ans)
}
