package main

import (
	"fmt"
)

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

	blacked := false
	ans := 0

	for _, r := range s {
		if r == '#' {
			blacked = true
		} else if blacked {
			ans++
		}
	}

	fmt.Println(ans)
}
