from sys import stdin
from itertools import groupby

n = [int(x) for x in stdin.readline().rstrip().split()]
s = stdin.readline().rstrip().split()
s = s[0]

cnt = 0
pre = ''
for key, value in groupby(s):
    if pre == '':
        pre = key
        continue

    if pre == '#' and key == '.':
        cnt += 1

print(cnt)