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

foundBlack = False
count = 0
for i in range(N):
    if not foundBlack:
        if S[i] == '#':
            foundBlack = True
    else:
        if S[i] == '.':
            count = count + 1

print(count)
