n = int(input())
s = input()
l = -1
for i in range(n):
    if s[i:i+1] == "#":
        l = i
        break
if l == -1:
    print(0)
else:
    ans = 0
    for i in range(l,n):
        if s[i:i+1] == ".":
            ans += 1
    print(ans)