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