N = int(input())
S = str(input())
S = list(S)
c = 0

for i in range(N):
    if S[i] == '#':
        for j in range(N-i):
            if S[i+j] == '.':
                c += 1
    break
                
print(c)        