n = int(input())
s = list(input())
for i in range(n):
    if i == 0:
        ans = 0
        flag = False
    elif not flag:
        if s[i] == "#":
            flag
    else:
        if s[i] == ".":
            ans += 1
print(ans)
