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