N = int(input())
S = input()


def m():
    tmp = '.'
    ans = 0
    for c in S:
        if tmp == '#' and c == '.':
            ans += 1

        if c == '#':
            tmp = '#'
        else:
            tmp = '.'
    return ans

print(m())