n = int(input())
s = list(input())

res = 0
index = 0
if s[0] == ".":
    for i in range(1, len(s)):
        if s[i] != s[i - 1]:
            index = i
            break
        index = len(s)
for i in range(index, len(s)):
    if s[i] == ".":
        res += 1

print(res)