package main

import (
	"bufio"
	"fmt"
	"os"
)

var sc = bufio.NewScanner(os.Stdin)

func smaller(a, b int) int {
	if a < b {
		return a
	}
	return b
}

func main() {
	sc.Split(bufio.ScanWords)

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

	ct1 := 0
	ct2 := 0
	for _, ss := range s {
		if ss == '.' {
			ct1++
		} else { // ss == '#'
			ct2++
		}
	}

	fmt.Println(smaller(ct1, ct2))
}
