import re

N = int(input())
S = list(str(input()))

count = 0

for index, stone in enumerate(S):
    if index is not len(S)-1:
        if stone is '#' and S[index+1] is '.':
            count = count + 1

print(count)
