n = int(input())
s = input()

cand = [j for j in range(len(s)) if s[j] =="#" and s[j+1] !="#"]
count =0
if start == -1 or end == -1:
    print(0)
else:
    for i in cand:
        if s[i] == "#" and s[i+1] == ".":
            count +=1
    print(count)