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

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