n = int(input())
s = input()
c = 0
ans = 0

for i, v in enumerate(s):
    if i == 0:
        if v == '#':
            ans += 1
            c = 1
        continue
    if c:
        c = 0
        continue
    if v == '#' and s[i-1:i] == '#':
        ans += 1
        c = 1
    else:
        c = 0

print(ans)