def MI(): return map(int, input().split())
def II(): return int(input())
def IS(): return input()
def LI(): return list(map(int, input().split()))


n = II()
s = list(IS())
count = 0
for i in range(len(s)):
    if i == len(s)-1:
        break
    if s[i] == '#' and s[i+1] == '.':
        count += 1
        s[i] == '.'
print(count)
