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

i = 0
ans = 0

while i < N and S[i] == ".":
    i += 1

if i == N -1:
    print("0")
else:
    while i < N:
        if S[i] == "." :
            ans += 1
        i += 1

print(ans)