N = int(input())
S = input()

i_string = 0
ans = 0
for i in range(N):
    i_string = S[i:i+1]
    if i_string == "#":
        right_string = S[i+1:i+2]
        if right_string == ".":
            S = (S[:i+1] + "#" + S[i+2:])
            ans += 1

print(ans)
