import itertools
n = int(input())
s = [i for i in input()]
ans = 0
gr = itertools.groupby(s)
cnt = 0
for k, g in gr:
    if cnt == 0 and k == ".": continue
    if k == ".": ans += 1
    cnt += 1
print(ans)