from sys import stdin

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

indexes = [i for i, x in enumerate(s) if x == '.']

cnt = 0
for i in indexes:
    if s[i-1] == '#':
        cnt += 1

print(cnt)
