n = int(input())
s = input()
end = len(s) -1

s1 = s[:]
i = 0
ans1 = 0
while(i < end):
    if s1[i] == '.':
        continue
    c = s1[i] + s1[i+1]
    if c == '#.':
        j = 0
        s1 = s1[:i+1] + '#' + s1[i+2:]
        ans1 = ans1+ 1
    i += 1
print(ans1)