# coding: utf-8
_ = input()
s = list(input())
cnt = 0

for i in range(len(s)-1):
    if s[i] != s[i+1] and s[i+1]=='.':
        cnt += 1
        try:
            if s[i+2] == '.':
                s[i] = '.'
            else:
                s[i+1] = '#'
        except:
            s[i+1] = '#'

print(cnt)