def remove_fwhite(S):
    fwhite = 0
    for fw in S:
        if fw == '.':
            fwhite += 1
        else:
            break
    return fwhite

def count_stone(S):
    black = 0
    white = 0
    for stone in S:
        if stone == '#':
            black += 1
        else:
            white += 1
    print(white)

N = int(input())
S = str(input())


fw = remove_fwhite(S)
if fw ==0:
    count_stone(S)
elif fw == N:
    print('0')
else:
    count_stone(S[fw:])
