package main

import (
	"fmt"
)

func main() {
	var N int
	var S string
	fmt.Scan(&N, &S)
	count := 0
	slice := []int{}
	flag := 0
	total := 0
	if string(S[0]) == "." {
		flag = 1
	}
	for i := 0; i < N-1; i++ {
		l := string(S[i])
		r := string(S[i+1])
		if l == r {
			count++
		} else {
			slice = append(slice, count)
			count = 0
		}

	}
	if flag == 0 {
		for i := 0; i < len(slice); i++ {
			if i%2 == 0 {
				total += slice[i]
			}
		}
	} else {
		for i := 0; i < len(slice); i++ {
			if i%2 == 1 {
				total += slice[i]
			}
		}
	}

	fmt.Println(count)
}
