N = int(input())
S = input()
count = S.count(".")
if S[0] == ".":
    white_continue = True
l = 0
for s in S:
    if s == "." and white_continue:
        l += 1
    else:
        white_continue = False

count -= l
if S.count(".") == N:
    count = 0
print(count)
