N=int(input())
S=list(input())
count = 0
for i in range(N):
    try:
        if S[i] =='#':

            if S[i+1] == '.':

                S[i+1] = '#'

                count += 1
                
    except IndexError:
        break

print(count)