N = int(input())
S = list(input())
p = 0
cnt = 0
while len(S) != 0:
    if S[p] == '#':
        p += 1
        if len(S) <= p:
            break
        elif S[p] == '.':
            cnt += 1
            del S[:p+1]
            p = 0
    else:
        del S[0]
print(cnt)
