N = int(input())
S = input()
ans = 0
flag = False
for char in S:
    if flag:
        if char == ".":
            ans += 1
            continue
        continue
    if char == "#":
        flag = True
print(ans)