# coding: utf-8
intLength = int(input())
strStones = input()

intCount = 0
strPre = ""
for intIdx in range(intLength):
    if strPre == "#" and strStones[intIdx] == ".":
        intCount += 1
        strPre = "#"
    else:
        strPre = strStones[intIdx]

print(intCount)
