N=int(input())
S=list(input())

for i in range(N):
    try:
        if S[i] =='#':

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

                S[i+1] = 'X'

    except IndexError:
        break



print(S.count('X'))