n = int(input())
s = input()
#n = len(s)

cnt = 0
i = 0
while True:
    if s[i] == '.':
        break
    else:
        if i == n-1:
            break
    i += 1

if i == n-1:
    pass
else:
    for j in range(i, n):
        if s[j] == '#':
            cnt += 1

print(cnt)