# coding: utf-8
# Your code here!

N = int(input())
S = list(input())
count = 0

# for i in reversed(range(len(S) - 1)):
#     if S[i] == '#':
#         count += 1

# print(S)

for i in range(len(S)):

    if S[i] == '.':
        if S[i - 1] == '#':
            count += 1
            S[i] = '#'

print(count)
