from sys import stdin

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

cnt = 0
for i in range(len(s)):
    if len(s) == i + 1:
        break

    if s[i] == '#' and s[i + 1] == '.':
        cnt += 1

print(cnt)